mirror of
https://github.com/zaphar/ucg.git
synced 2025-07-21 18:10:42 -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)]
|
||||
pub struct StackPrinter<C: abortable_parser::Positioned> {
|
||||
pub struct StackPrinter<C: Positioned> {
|
||||
pub err: abortable_parser::Error<C>,
|
||||
}
|
||||
|
||||
impl<C> StackPrinter<C>
|
||||
where
|
||||
C: abortable_parser::Positioned,
|
||||
{
|
||||
impl<C: Positioned> StackPrinter<C> {
|
||||
pub fn render(&self, w: &mut fmt::Formatter) -> fmt::Result {
|
||||
let mut curr_err = Some(&self.err);
|
||||
let mut tabstop = "";
|
||||
@ -138,10 +135,7 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
impl<C> fmt::Display for StackPrinter<C>
|
||||
where
|
||||
C: Positioned,
|
||||
{
|
||||
impl<C: Positioned> fmt::Display for StackPrinter<C> {
|
||||
fn fmt(&self, w: &mut fmt::Formatter) -> fmt::Result {
|
||||
self.render(w)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user