From 896dd56b7af06fea6604a5596a6ffd17e7e52e6e Mon Sep 17 00:00:00 2001 From: Yiyu Lin Date: Fri, 6 Jan 2023 03:29:50 +0800 Subject: refactor(cli,core,ext,rt): remove some unnecessary `clone` or `malloc` (#17274) --- cli/args/mod.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'cli/args/mod.rs') 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 -- cgit v1.2.3