File tree Expand file tree Collapse file tree 4 files changed +7
-11
lines changed
factor-sqlite/src/runtime_config Expand file tree Collapse file tree 4 files changed +7
-11
lines changed Original file line number Diff line number Diff line change @@ -75,15 +75,10 @@ impl ModuleInfo {
75
75
/// Returns true if the given module was heuristically probably compiled
76
76
/// with wit-bindgen.
77
77
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 ( ) ||
82
80
// A canonical ABI realloc export is a decent signal
83
- true
84
- } else {
85
- false
86
- }
81
+ self . realloc_export . is_some ( )
87
82
}
88
83
89
84
/// Returns the wit-bindgen metadata producers processed-by field, if
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ impl RuntimeConfigResolver {
30
30
/// This takes as arguments:
31
31
/// * the directory to use as the default location for SQLite databases.
32
32
/// 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.
34
34
/// * the path to the directory from which relative paths to
35
35
/// local SQLite databases are resolved. (this should most likely be the
36
36
/// path to the runtime-config file or the current working dir).
Original file line number Diff line number Diff line change @@ -339,8 +339,9 @@ pub fn key_value_config_resolver(
339
339
340
340
key_value
341
341
}
342
+
342
343
/// 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" ;
344
345
345
346
/// The sqlite runtime configuration resolver.
346
347
///
Original file line number Diff line number Diff line change @@ -312,7 +312,7 @@ impl<T: Trigger> TriggerAppBuilder<T> {
312
312
let use_gpu = true ;
313
313
let state_dir = match options. state_dir {
314
314
// 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 ,
316
316
Some ( s) => Some ( PathBuf :: from ( s) ) ,
317
317
// Default to `.spin/` in the local app dir
318
318
None => options. local_app_dir . map ( |d| Path :: new ( d) . join ( ".spin" ) ) ,
You can’t perform that action at this time.
0 commit comments