fix: clippy
This commit is contained in:
parent
ec6f1f84e2
commit
8115443990
|
@ -1,4 +1,4 @@
|
||||||
use std::rc::Rc;
|
use std::{fmt::Display, rc::Rc};
|
||||||
|
|
||||||
use crate::ast::{Constant, NamedDeBruijn, Term, Type};
|
use crate::ast::{Constant, NamedDeBruijn, Term, Type};
|
||||||
|
|
||||||
|
@ -51,14 +51,16 @@ pub enum Trace {
|
||||||
Label(String),
|
Label(String),
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Trace {
|
impl Display for Trace {
|
||||||
pub fn to_string(&self) -> String {
|
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
match self {
|
match self {
|
||||||
Trace::Log(log) => log.clone(),
|
Trace::Log(log) => f.write_str(log),
|
||||||
Trace::Label(label) => label.clone(),
|
Trace::Label(label) => f.write_str(label),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Trace {
|
||||||
pub fn unwrap_log(self) -> Option<String> {
|
pub fn unwrap_log(self) -> Option<String> {
|
||||||
match self {
|
match self {
|
||||||
Trace::Log(log) => Some(log),
|
Trace::Log(log) => Some(log),
|
||||||
|
|
Loading…
Reference in New Issue