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 {
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
Original file line number Diff line number Diff 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).
Original file line number Diff line number Diff 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///
Original file line number Diff line number Diff 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" ) ) ,
You can’t perform that action at this time.
0 commit comments