Skip to content

Commit 30c3009

Browse files
committed
Make Clippy happy
Signed-off-by: Ryan Levick <[email protected]>
1 parent 6bbf434 commit 30c3009

File tree

4 files changed

+7
-11
lines changed

4 files changed

+7
-11
lines changed

crates/componentize/src/module_info.rs

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -75,15 +75,10 @@ impl ModuleInfo {
7575
/// Returns true if the given module was heuristically probably compiled
7676
/// with wit-bindgen.
7777
pub fn probably_uses_wit_bindgen(&self) -> bool {
78-
if self.bindgen.is_some() {
79-
// Presence of bindgen metadata is a strong signal
80-
true
81-
} else if self.realloc_export.is_some() {
78+
// Presence of bindgen metadata is a strong signal
79+
self.bindgen.is_some() ||
8280
// A canonical ABI realloc export is a decent signal
83-
true
84-
} else {
85-
false
86-
}
81+
self.realloc_export.is_some()
8782
}
8883

8984
/// Returns the wit-bindgen metadata producers processed-by field, if

crates/factor-sqlite/src/runtime_config/spin.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ impl RuntimeConfigResolver {
3030
/// This takes as arguments:
3131
/// * the directory to use as the default location for SQLite databases.
3232
/// Usually this will be the path to the `.spin` state directory. If
33-
/// `None`, the default database will be in-memory.
33+
/// `None`, the default database will be in-memory.
3434
/// * the path to the directory from which relative paths to
3535
/// local SQLite databases are resolved. (this should most likely be the
3636
/// path to the runtime-config file or the current working dir).

crates/runtime-config/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,8 +339,9 @@ pub fn key_value_config_resolver(
339339

340340
key_value
341341
}
342+
342343
/// The default filename for the SQLite database.
343-
const DEFAULT_SPIN_STORE_FILENAME: &'static str = "sqlite_key_value.db";
344+
const DEFAULT_SPIN_STORE_FILENAME: &str = "sqlite_key_value.db";
344345

345346
/// The sqlite runtime configuration resolver.
346347
///

crates/trigger/src/cli.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ impl<T: Trigger> TriggerAppBuilder<T> {
312312
let use_gpu = true;
313313
let state_dir = match options.state_dir {
314314
// Make sure `--state-dir=""` unsets the state dir
315-
Some(s) if s.is_empty() => None,
315+
Some(s) if s.trim().is_empty() => None,
316316
Some(s) => Some(PathBuf::from(s)),
317317
// Default to `.spin/` in the local app dir
318318
None => options.local_app_dir.map(|d| Path::new(d).join(".spin")),

0 commit comments

Comments
 (0)