Skip to content

Commit

Permalink
location: Refactor from_path -> with_path
Browse files Browse the repository at this point in the history
  • Loading branch information
CohenArthur committed Apr 7, 2022
1 parent a928eab commit ae944ab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/location.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ impl SpanTuple {
format!(" {} {}", separator, line)
}

fn from_path<T1: Display, T2: Display>(
fn with_path<T1: Display, T2: Display>(
&self,
separator: &T1,
repetitor: &T2,
Expand Down Expand Up @@ -240,7 +240,7 @@ impl SpanTuple {
fn to_string<T1: Display, T2: Display>(&self, separator: &T1, repetitor: &T2) -> String {
log!("span: {:?}", &self);
match &self.path {
Some(path) => self.from_path(separator, repetitor, path),
Some(path) => self.with_path(separator, repetitor, path),
None => String::new(), // FIXME: Do we want to return an empty string if there is no path?
}
}
Expand Down

0 comments on commit ae944ab

Please sign in to comment.