summaryrefslogtreecommitdiff
path: root/cli/args/config_file.rs
diff options
context:
space:
mode:
authorYiyu Lin <linyiyu1992@gmail.com>2023-01-15 12:06:46 +0800
committerGitHub <noreply@github.com>2023-01-15 09:36:46 +0530
commitfd85f840cd707c31d08fa836562127e249c9ff62 (patch)
treec4847881976069d41d1b53616bdeaf5d073f3af6 /cli/args/config_file.rs
parent05ef925eb095ae603f694fe8172ddcbd5b19b9b2 (diff)
refactor: clean up `unwrap` and `clone` (#17282)
Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
Diffstat (limited to 'cli/args/config_file.rs')
-rw-r--r--cli/args/config_file.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/cli/args/config_file.rs b/cli/args/config_file.rs
index 47f8e9daa..199f84709 100644
--- a/cli/args/config_file.rs
+++ b/cli/args/config_file.rs
@@ -213,7 +213,7 @@ impl TsConfig {
}
pub fn as_bytes(&self) -> Vec<u8> {
- let map = self.0.as_object().unwrap();
+ let map = self.0.as_object().expect("invalid tsconfig");
let ordered: BTreeMap<_, _> = map.iter().collect();
let value = json!(ordered);
value.to_string().as_bytes().to_owned()