Skip to content

Commit 51d19fd

Browse files
gakerclaude
authored andcommitted
Pass clippy without docket-rs's default features
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 5cf9ee4 commit 51d19fd

3 files changed

Lines changed: 9 additions & 2 deletions

File tree

‎.github/workflows/rust.yml‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@ jobs:
3535
- name: Run clippy
3636
run: cargo clippy --workspace --all-targets --all-features --locked -- -D warnings
3737

38+
# A build without TLS, or without any of docket-rs's features, is one
39+
# that users can choose.
40+
- name: Run clippy without default features
41+
run: cargo clippy -p docket-rs --all-targets --no-default-features --locked -- -D warnings
42+
3843
- name: Build the docs
3944
env:
4045
RUSTDOCFLAGS: -D warnings

‎rust/docket/src/connection/mod.rs‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,9 @@ impl Backend {
9191
Kind::Standalone(client) | Kind::Cluster { pubsub: client, .. } => {
9292
credentials::has_credentials(client)
9393
}
94-
_ => false,
94+
Kind::Sentinel(_) => false,
95+
#[cfg(feature = "memory")]
96+
Kind::Memory(_) => false,
9597
};
9698
if credentials.is_some() && url_credentials {
9799
return Err(crate::Error::url(

‎rust/docket/src/context.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ impl Context {
137137
}
138138
}
139139

140-
#[cfg(test)]
140+
#[cfg(all(test, feature = "memory"))]
141141
impl Context {
142142
/// A context for a run of `function` with empty arguments, for unit
143143
/// tests of handlers and hooks.

0 commit comments

Comments
 (0)