Skip to content

Conversation

@avsaase
Copy link

@avsaase avsaase commented Aug 9, 2025

While going though the code to see how it worked I noticed there we're some unused dependencies. I think these were left over from when the session stores were still part of this repo. Since I already had the code checked out I figured I might as well make a PR to remove them.

It's not entirely clear to me why some dependencies are inherited from the workspace and some not. I could help clean this up if you want.

@avsaase
Copy link
Author

avsaase commented Aug 9, 2025

I can't reproduce the clippy errors locally. Instead of the errors in CI I get the new mismatched lifetime syntaxes lint:

error: hiding a lifetime that's elided elsewhere is confusing
   --> tower-sessions-core/src/session.rs:108:25
    |
108 |     async fn get_record(&self) -> Result<MappedMutexGuard<Record>> {
    |                         ^^^^^            ------------------------ the same lifetime is hidden here
    |                         |
    |                         the lifetime is elided here
    |
    = help: the same lifetime is referred to in inconsistent ways, making the signature confusing
    = note: `-D mismatched-lifetime-syntaxes` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(mismatched_lifetime_syntaxes)]`
help: use `'_` for type paths
    |
108 |     async fn get_record(&self) -> Result<MappedMutexGuard<'_, Record>> {
    |                                                           +++

error: could not compile `tower-sessions-core` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...

@maxcountryman
Copy link
Owner

I can't reproduce the clippy errors locally.

Probably the Rust versions don't match (or for example you're using stable whereas CI is using nightly).

We should probably fix the lint errors and pin the version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants