Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Use reusable workflows for fmt and security_audit & fix CI failure #96

Merged
merged 3 commits into from
Jan 19, 2025

Conversation

taiki-e
Copy link
Collaborator

@taiki-e taiki-e commented Jan 19, 2025

See smol-rs/.github#1 for details about reusable workflows.

```
error: the following explicit lifetimes could be elided: 'a
   --> src/once_cell.rs:690:14
    |
690 |         impl<'a, T> Drop for Guard<'a, T> {
    |              ^^                    ^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    = note: `-D clippy::needless-lifetimes` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::needless_lifetimes)]`
help: elide the lifetimes
    |
690 -         impl<'a, T> Drop for Guard<'a, T> {
690 +         impl<T> Drop for Guard<'_, T> {
    |

error: the following explicit lifetimes could be elided: 'a
   --> src/rwlock/futures.rs:107:6
    |
107 | impl<'a, T> EventListenerFuture for ReadArcInner<'a, T> {
    |      ^^                                          ^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
    |
107 - impl<'a, T> EventListenerFuture for ReadArcInner<'a, T> {
107 + impl<T> EventListenerFuture for ReadArcInner<'_, T> {
    |

error: the following explicit lifetimes could be elided: 'a
   --> src/rwlock/futures.rs:219:6
    |
219 | impl<'a, T: ?Sized> EventListenerFuture for UpgradableReadArcInner<'a, T> {
    |      ^^                                                            ^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
    |
219 - impl<'a, T: ?Sized> EventListenerFuture for UpgradableReadArcInner<'a, T> {
219 + impl<T: ?Sized> EventListenerFuture for UpgradableReadArcInner<'_, T> {
    |

error: the following explicit lifetimes could be elided: 'a
   --> src/rwlock/futures.rs:326:6
    |
326 | impl<'a, T: ?Sized> EventListenerFuture for WriteArcInner<'a, T> {
    |      ^^                                                   ^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
    |
326 - impl<'a, T: ?Sized> EventListenerFuture for WriteArcInner<'a, T> {
326 + impl<T: ?Sized> EventListenerFuture for WriteArcInner<'_, T> {
    |

error: the following explicit lifetimes could be elided: 'a
   --> src/rwlock/raw.rs:310:6
    |
310 | impl<'a> EventListenerFuture for RawRead<'a> {
    |      ^^                                  ^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
    |
310 - impl<'a> EventListenerFuture for RawRead<'a> {
310 + impl EventListenerFuture for RawRead<'_> {
    |

error: the following explicit lifetimes could be elided: 'a
   --> src/rwlock/raw.rs:375:6
    |
375 | impl<'a> EventListenerFuture for RawUpgradableRead<'a> {
    |      ^^                                            ^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
    |
375 - impl<'a> EventListenerFuture for RawUpgradableRead<'a> {
375 + impl EventListenerFuture for RawUpgradableRead<'_> {
    |

error: the following explicit lifetimes could be elided: 'a
   --> src/rwlock/raw.rs:458:6
    |
458 | impl<'a> EventListenerFuture for RawWrite<'a> {
    |      ^^                                   ^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
    |
458 - impl<'a> EventListenerFuture for RawWrite<'a> {
458 + impl EventListenerFuture for RawWrite<'_> {
    |

error: the following explicit lifetimes could be elided: 'a
   --> src/rwlock/raw.rs:586:6
    |
586 | impl<'a> RawUpgrade<'a> {
    |      ^^             ^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
    |
586 - impl<'a> RawUpgrade<'a> {
586 + impl RawUpgrade<'_> {
    |

error: the following explicit lifetimes could be elided: 'a
   --> src/rwlock.rs:851:6
    |
851 | impl<'a, T: ?Sized> Drop for RwLockUpgradableReadGuard<'a, T> {
    |      ^^                                                ^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
    |
851 - impl<'a, T: ?Sized> Drop for RwLockUpgradableReadGuard<'a, T> {
851 + impl<T: ?Sized> Drop for RwLockUpgradableReadGuard<'_, T> {
    |

error: the following explicit lifetimes could be elided: 'a
    --> src/rwlock.rs:1222:6
     |
1222 | impl<'a, T: ?Sized> Drop for RwLockWriteGuard<'a, T> {
     |      ^^                                       ^^
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
     |
1222 - impl<'a, T: ?Sized> Drop for RwLockWriteGuard<'a, T> {
1222 + impl<T: ?Sized> Drop for RwLockWriteGuard<'_, T> {
     |
```
…r_outer_attr warnings

```
error: empty line after doc comment
   --> src/rwlock/raw.rs:99:5
    |
99  | /     /// Returns `true` iff an upgradable read lock was successfully acquired.
100 | |
    | |_^
101 |       pub(super) fn try_upgradable_read(&self) -> bool {
    |       ------------------------------------------------ the comment documents this method
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments
    = note: `-D clippy::empty-line-after-doc-comments` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::empty_line_after_doc_comments)]`
    = help: if the empty line is unintentional remove it

error: empty line after outer attribute
   --> src/rwlock/raw.rs:132:5
    |
132 | /     #[inline]
133 | |
    | |_^
134 |       pub(super) fn upgradable_read(&self) -> RawUpgradableRead<'_> {
    |       ------------------------------------------------------------- the attribute applies to this method
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_outer_attr
    = note: `-D clippy::empty-line-after-outer-attr` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::empty_line_after_outer_attr)]`
    = help: if the empty line is unintentional remove it

error: empty line after doc comment
   --> src/rwlock/raw.rs:141:5
    |
141 | /     /// Returns `true` iff a write lock was successfully acquired.
142 | |
    | |_^
143 |       pub(super) fn try_write(&self) -> bool {
    |       -------------------------------------- the comment documents this method
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments
    = help: if the empty line is unintentional remove it

error: empty line after outer attribute
   --> src/rwlock/raw.rs:165:5
    |
165 | /     #[inline]
166 | |
    | |_^
167 |       pub(super) fn write(&self) -> RawWrite<'_> {
    |       ------------------------------------------ the attribute applies to this method
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_outer_attr
    = help: if the empty line is unintentional remove it

error: empty line after doc comment
   --> src/rwlock/raw.rs:182:5
    |
182 | /     /// This will attempt to upgrade it to a write lock.
183 | |
    | |_^
184 |       pub(super) unsafe fn try_upgrade(&self) -> bool {
    |       ----------------------------------------------- the comment documents this method
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments
    = help: if the empty line is unintentional remove it

error: empty line after doc comment
   --> src/rwlock/raw.rs:193:5
    |
193 | /     /// This will upgrade it to a write lock.
194 | |
    | |_^
195 |       pub(super) unsafe fn upgrade(&self) -> RawUpgrade<'_> {
    |       ----------------------------------------------------- the comment documents this method
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments
    = help: if the empty line is unintentional remove it

error: empty line after outer attribute
   --> src/rwlock/raw.rs:211:5
    |
211 | /     #[inline]
212 | |
    | |_^
213 |       pub(super) unsafe fn downgrade_upgradable_read(&self) {
    |       ----------------------------------------------------- the attribute applies to this method
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_outer_attr
    = help: if the empty line is unintentional remove it

error: empty line after doc comment
   --> src/rwlock/raw.rs:220:5
    |
220 | /     /// This will downgrade it to a read lock.
221 | |
    | |_^
222 |       pub(super) unsafe fn downgrade_write(&self) {
    |       ------------------------------------------- the comment documents this method
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments
    = help: if the empty line is unintentional remove it

error: empty line after doc comment
   --> src/rwlock/raw.rs:237:5
    |
237 | /     /// This will downgrade it to an upgradable read lock.
238 | |
    | |_^
239 |       pub(super) unsafe fn downgrade_to_upgradable(&self) {
    |       --------------------------------------------------- the comment documents this method
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments
    = help: if the empty line is unintentional remove it

error: empty line after doc comment
   --> src/rwlock/raw.rs:248:5
    |
248 | /     /// This will unlock that lock.
249 | |
    | |_^
250 |       pub(super) unsafe fn read_unlock(&self) {
    |       --------------------------------------- the comment documents this method
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments
    = help: if the empty line is unintentional remove it

error: empty line after doc comment
   --> src/rwlock/raw.rs:261:5
    |
261 | /     /// This will unlock that lock.
262 | |
    | |_^
263 |       pub(super) unsafe fn upgradable_read_unlock(&self) {
    |       -------------------------------------------------- the comment documents this method
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments
    = help: if the empty line is unintentional remove it

error: empty line after doc comment
   --> src/rwlock/raw.rs:277:5
    |
277 | /     /// This will unlock that lock.
278 | |
    | |_^
279 |       pub(super) unsafe fn write_unlock(&self) {
    |       ---------------------------------------- the comment documents this method
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments
    = help: if the empty line is unintentional remove it
```
@taiki-e taiki-e merged commit cd0937d into master Jan 19, 2025
10 checks passed
@taiki-e taiki-e deleted the taiki-e/ci branch January 19, 2025 15:55
@taiki-e taiki-e changed the title ci: Use reusable workflows for fmt and security_audit ci: Use reusable workflows for fmt and security_audit & fix CI failure Jan 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant