refactor(tvix/eval): impl Default for SourceCode

… 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>
This commit is contained in:
Florian Klink 2023-08-19 17:31:48 +02:00 committed by flokli
parent cf1a884ec5
commit aead2001d7
2 changed files with 8 additions and 6 deletions

View file

@ -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()