Kill unused argument warnings the right way
This commit is contained in:
parent
f6372db0c8
commit
636e853357
12
src/main.rs
12
src/main.rs
@ -1065,8 +1065,7 @@ struct SitExtent{
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl Situation for SitExtent {
|
impl Situation for SitExtent {
|
||||||
#[allow(unused_variables)]
|
fn whatnow(&mut self, horizon: &[u8], _is_horizon_lengthenable: bool) -> ParseResult {
|
||||||
fn whatnow(&mut self, horizon: &[u8], is_horizon_lengthenable: bool) -> ParseResult {
|
|
||||||
if horizon.len() >= self.len {
|
if horizon.len() >= self.len {
|
||||||
return Ok(WhatNow{tri: Transition::Pop, pre: self.len, len: 0, alt: self.end_insert});
|
return Ok(WhatNow{tri: Transition::Pop, pre: self.len, len: 0, alt: self.end_insert});
|
||||||
}
|
}
|
||||||
@ -1085,8 +1084,7 @@ struct SitUntilByte {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl Situation for SitUntilByte {
|
impl Situation for SitUntilByte {
|
||||||
#[allow(unused_variables)]
|
fn whatnow(&mut self, horizon: &[u8], _is_horizon_lengthenable: bool) -> ParseResult {
|
||||||
fn whatnow(&mut self, horizon: &[u8], is_horizon_lengthenable: bool) -> ParseResult {
|
|
||||||
let len = predlen(&|x| x != self.until, &horizon);
|
let len = predlen(&|x| x != self.until, &horizon);
|
||||||
return Ok(if len < horizon.len() {
|
return Ok(if len < horizon.len() {
|
||||||
WhatNow{tri: Transition::Pop, pre: len, len: 1, alt: self.end_replace}
|
WhatNow{tri: Transition::Pop, pre: len, len: 1, alt: self.end_replace}
|
||||||
@ -1108,8 +1106,7 @@ impl Situation for SitUntilByte {
|
|||||||
struct SitStrSqEsc {}
|
struct SitStrSqEsc {}
|
||||||
|
|
||||||
impl Situation for SitStrSqEsc {
|
impl Situation for SitStrSqEsc {
|
||||||
#[allow(unused_variables)]
|
fn whatnow(&mut self, horizon: &[u8], _is_horizon_lengthenable: bool) -> ParseResult {
|
||||||
fn whatnow(&mut self, horizon: &[u8], is_horizon_lengthenable: bool) -> ParseResult {
|
|
||||||
for i in 0 .. horizon.len() {
|
for i in 0 .. horizon.len() {
|
||||||
if horizon[i] == b'\\' {
|
if horizon[i] == b'\\' {
|
||||||
let esc = Box::new(SitExtent{len: 1, color: 0x01ff0080, end_insert: None});
|
let esc = Box::new(SitExtent{len: 1, color: 0x01ff0080, end_insert: None});
|
||||||
@ -1131,8 +1128,7 @@ struct SitVarIdent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl Situation for SitVarIdent {
|
impl Situation for SitVarIdent {
|
||||||
#[allow(unused_variables)]
|
fn whatnow(&mut self, horizon: &[u8], _is_horizon_lengthenable: bool) -> ParseResult {
|
||||||
fn whatnow(&mut self, horizon: &[u8], is_horizon_lengthenable: bool) -> ParseResult {
|
|
||||||
let len = predlen(&is_identifiertail, &horizon);
|
let len = predlen(&is_identifiertail, &horizon);
|
||||||
if len < horizon.len() {
|
if len < horizon.len() {
|
||||||
return Ok(WhatNow{tri: Transition::Pop, pre: len, len: 0, alt: self.end_insert});
|
return Ok(WhatNow{tri: Transition::Pop, pre: len, len: 0, alt: self.end_insert});
|
||||||
|
Loading…
Reference in New Issue
Block a user