mirror of
https://github.com/zaphar/ucg.git
synced 2025-07-22 18:19:54 -04:00
REFACTOR: unnecessary where clause.
This commit is contained in:
parent
7793404975
commit
e2f639a440
12
src/error.rs
12
src/error.rs
@ -101,14 +101,11 @@ impl error::Error for BuildError {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct StackPrinter<C: abortable_parser::Positioned> {
|
pub struct StackPrinter<C: Positioned> {
|
||||||
pub err: abortable_parser::Error<C>,
|
pub err: abortable_parser::Error<C>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<C> StackPrinter<C>
|
impl<C: Positioned> StackPrinter<C> {
|
||||||
where
|
|
||||||
C: abortable_parser::Positioned,
|
|
||||||
{
|
|
||||||
pub fn render(&self, w: &mut fmt::Formatter) -> fmt::Result {
|
pub fn render(&self, w: &mut fmt::Formatter) -> fmt::Result {
|
||||||
let mut curr_err = Some(&self.err);
|
let mut curr_err = Some(&self.err);
|
||||||
let mut tabstop = "";
|
let mut tabstop = "";
|
||||||
@ -138,10 +135,7 @@ where
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<C> fmt::Display for StackPrinter<C>
|
impl<C: Positioned> fmt::Display for StackPrinter<C> {
|
||||||
where
|
|
||||||
C: Positioned,
|
|
||||||
{
|
|
||||||
fn fmt(&self, w: &mut fmt::Formatter) -> fmt::Result {
|
fn fmt(&self, w: &mut fmt::Formatter) -> fmt::Result {
|
||||||
self.render(w)
|
self.render(w)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user