about summary refs log tree commit diff
path: root/tvix/eval/src/lib.rs
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2023-08-19T15·31+0200
committerflokli <flokli@flokli.de>2023-08-20T21·52+0000
commitaead2001d7c3535be0f2f49daf73fe8a658d0c51 (patch)
treec2cae4d0ee0eb6537542985ff0da7ef5331d1bce /tvix/eval/src/lib.rs
parentcf1a884ec52dc7e837ae19fb2332292419707fda (diff)
refactor(tvix/eval): impl Default for SourceCode r/6507
… instead of new(). Suggested by clippy.

Change-Id: Iac7be733392afefc2b4ff2e38386eee95f3bce94
Reviewed-on: https://cl.tvl.fyi/c/depot/+/9103
Tested-by: BuildkiteCI
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: raitobezarius <tvl@lahfa.xyz>
Diffstat (limited to 'tvix/eval/src/lib.rs')
-rw-r--r--tvix/eval/src/lib.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/tvix/eval/src/lib.rs b/tvix/eval/src/lib.rs
index deb48b50078e..3ce98bc47097 100644
--- a/tvix/eval/src/lib.rs
+++ b/tvix/eval/src/lib.rs
@@ -145,7 +145,7 @@ impl<'code, 'co, 'ro> Evaluation<'code, 'co, 'ro> {
     /// Initialise an `Evaluation` for the given Nix source code snippet, and
     /// an optional code location.
     pub fn new(code: &'code str, location: Option<PathBuf>) -> Self {
-        let source_map = SourceCode::new();
+        let source_map = SourceCode::default();
 
         let location_str = location
             .as_ref()