From 8a38899c98b4f9829b2d1f21c8fee66d254d20c6 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Sun, 14 Nov 2021 14:53:01 +0100 Subject: Tidying --- src/source.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/source.rs') diff --git a/src/source.rs b/src/source.rs index 85f48491..e692ac94 100644 --- a/src/source.rs +++ b/src/source.rs @@ -144,6 +144,11 @@ impl SourceFile { } } + /// Create a source file without a real id and path, usually for testing. + pub fn detached(src: impl Into) -> Self { + Self::new(SourceId(0), Path::new(""), src.into()) + } + /// The file's abstract syntax tree. pub fn ast(&self) -> TypResult { let red = RedNode::from_root(self.root.clone(), self.id); @@ -155,11 +160,6 @@ impl SourceFile { } } - /// Create a source file without a real id and path, usually for testing. - pub fn detached(src: impl Into) -> Self { - Self::new(SourceId(0), Path::new(""), src.into()) - } - /// The id of the source file. pub fn id(&self) -> SourceId { self.id -- cgit v1.2.3