Skip to content

Commit

Permalink
misc fixes and nits from clippy (#104)
Browse files Browse the repository at this point in the history
  • Loading branch information
asmello authored Feb 17, 2025
1 parent c0201c7 commit cf16365
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/diagnostic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ where
F: FnOnce() -> S,
S: Into<<Self::Error as Diagnostic>::Subject>,
{
self.diagnose(f())
self.map_err(|error| error.into_report(f()))
}
}

Expand Down
12 changes: 2 additions & 10 deletions src/pointer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,6 @@ impl Pointer {
/// [`ResolveError`]: `crate::resolve::ResolveError`
/// [`Token`]: `crate::Token`
/// [`Index`]: `crate::index::Index`
#[cfg(feature = "resolve")]
pub fn resolve_mut<'v, R: crate::ResolveMut>(
&self,
Expand Down Expand Up @@ -679,7 +678,7 @@ impl PartialEq<&str> for Pointer {
&&self.0 == other
}
}
impl<'p> PartialEq<String> for &'p Pointer {
impl PartialEq<String> for &Pointer {
fn eq(&self, other: &String) -> bool {
self.0.eq(other)
}
Expand Down Expand Up @@ -869,7 +868,7 @@ impl PartialOrd<&str> for PointerBuf {
}
}

impl<'p> PartialOrd<PointerBuf> for &'p Pointer {
impl PartialOrd<PointerBuf> for &Pointer {
fn partial_cmp(&self, other: &PointerBuf) -> Option<Ordering> {
self.0.partial_cmp(other.0.as_str())
}
Expand Down Expand Up @@ -2343,11 +2342,4 @@ mod tests {
let unboxed = boxed.into_buf();
assert_eq!(subjectal, unboxed);
}

#[test]
#[cfg(feature = "miette")]
fn quick_miette_spike() {
let err = PointerBuf::parse("hello-world").unwrap_err();
println!("{:?}", miette::Report::from(err));
}
}

0 comments on commit cf16365

Please sign in to comment.