Skip to content

Commit 084bca2

Browse files
committed
refactor: consistent naming
1 parent c121c03 commit 084bca2

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

src/args/depth.rs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,21 +34,20 @@ pub enum FromStrError {
3434

3535
impl FromStr for Depth {
3636
type Err = FromStrError;
37-
fn from_str(source: &str) -> Result<Self, Self::Err> {
38-
let source = source.trim();
39-
if source == INFINITE {
37+
fn from_str(text: &str) -> Result<Self, Self::Err> {
38+
let text = text.trim();
39+
if text == INFINITE {
4040
return Ok(Depth::Infinite);
4141
}
42-
source
43-
.parse()
42+
text.parse()
4443
.map_err(FromStrError::InvalidSyntax)
4544
.map(Depth::Finite)
4645
}
4746
}
4847

4948
impl TryFrom<u64> for Depth {
5049
type Error = TryFromIntError;
51-
fn try_from(source: u64) -> Result<Self, Self::Error> {
52-
source.try_into().map(Depth::Finite)
50+
fn try_from(value: u64) -> Result<Self, Self::Error> {
51+
value.try_into().map(Depth::Finite)
5352
}
5453
}

0 commit comments

Comments
 (0)