summaryrefslogtreecommitdiff
path: root/cli/args/mod.rs
diff options
context:
space:
mode:
authorYiyu Lin <linyiyu1992@gmail.com>2023-01-06 03:29:50 +0800
committerGitHub <noreply@github.com>2023-01-05 14:29:50 -0500
commit896dd56b7af06fea6604a5596a6ffd17e7e52e6e (patch)
tree92d3c94afe4923f1d1faccc8034a03f78b807ade /cli/args/mod.rs
parent4e6b78cb43ece70df28281c8033b51366b110acf (diff)
refactor(cli,core,ext,rt): remove some unnecessary `clone` or `malloc` (#17274)
Diffstat (limited to 'cli/args/mod.rs')
-rw-r--r--cli/args/mod.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/cli/args/mod.rs b/cli/args/mod.rs
index 97b70698d..d677cf832 100644
--- a/cli/args/mod.rs
+++ b/cli/args/mod.rs
@@ -329,11 +329,11 @@ impl CliOptions {
// if a location is set, then the ascii serialization of the location is
// used, unless the origin is opaque, and then no storage origin is set, as
// we can't expect the origin to be reproducible
- let storage_origin = location.origin().ascii_serialization();
- if storage_origin == "null" {
- None
+ let storage_origin = location.origin();
+ if storage_origin.is_tuple() {
+ Some(storage_origin.ascii_serialization())
} else {
- Some(storage_origin)
+ None
}
} else if let Some(config_file) = &self.maybe_config_file {
// otherwise we will use the path to the config file