REFACTOR: unnecessary where clause.

This commit is contained in:
Jeremy Wall 2019-01-05 13:32:22 -06:00
parent 7793404975
commit e2f639a440

View File

@ -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)
} }