Import Debug instead of full reference
This commit is contained in:
parent
c1aa8fe463
commit
d23fad5382
8 changed files with 29 additions and 18 deletions
|
|
@ -1,3 +1,5 @@
|
|||
use std::fmt::Debug;
|
||||
|
||||
#[cfg(feature = "serde")]
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
|
|
@ -12,7 +14,7 @@ use serde::{Deserialize, Serialize};
|
|||
#[derive(Debug, Clone)]
|
||||
pub struct Token<T>
|
||||
where
|
||||
T: PartialEq + Clone + std::fmt::Debug,
|
||||
T: PartialEq + Clone + Debug,
|
||||
{
|
||||
/// The normalised form of the token used deriving the diff.
|
||||
normalised: T,
|
||||
|
|
@ -35,7 +37,7 @@ impl From<&str> for Token<String> {
|
|||
|
||||
impl<T> Token<T>
|
||||
where
|
||||
T: PartialEq + Clone + std::fmt::Debug,
|
||||
T: PartialEq + Clone + Debug,
|
||||
{
|
||||
pub fn new(
|
||||
normalised: T,
|
||||
|
|
@ -62,7 +64,7 @@ where
|
|||
|
||||
impl<T> PartialEq for Token<T>
|
||||
where
|
||||
T: PartialEq + Clone + std::fmt::Debug,
|
||||
T: PartialEq + Clone + Debug,
|
||||
{
|
||||
fn eq(&self, other: &Self) -> bool { self.normalised == other.normalised }
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue