removes unused variante ControlFunctionType::ControlString
This commit is contained in:
parent
2010dabf57
commit
6b81631b85
18
src/lib.rs
18
src/lib.rs
@ -65,7 +65,6 @@
|
|||||||
//! [ecma-48]: https://www.ecma-international.org/publications-and-standards/standards/ecma-48/
|
//! [ecma-48]: https://www.ecma-international.org/publications-and-standards/standards/ecma-48/
|
||||||
//! [iso-6429]: https://www.iso.org/standard/12782.html
|
//! [iso-6429]: https://www.iso.org/standard/12782.html
|
||||||
//! [wikipedia-ansi]: https://en.wikipedia.org/wiki/ANSI_escape_code
|
//! [wikipedia-ansi]: https://en.wikipedia.org/wiki/ANSI_escape_code
|
||||||
#![allow(dead_code)]
|
|
||||||
|
|
||||||
use std::{fmt, str};
|
use std::{fmt, str};
|
||||||
|
|
||||||
@ -139,15 +138,6 @@ enum ControlFunctionType {
|
|||||||
///
|
///
|
||||||
/// The independent control functions are defined in the module [independent_control_functions].
|
/// The independent control functions are defined in the module [independent_control_functions].
|
||||||
IndependentControlFunction,
|
IndependentControlFunction,
|
||||||
|
|
||||||
/// Control Strings.
|
|
||||||
///
|
|
||||||
/// A control string is a string of bit combinations which may occur in the data stream as a logical entity for
|
|
||||||
/// control purposes. A control string consists of an opening delimiter, a command string or character string, and
|
|
||||||
/// a terminating delimiter, the String Terminator ([`ST`][c1::ST]).
|
|
||||||
///
|
|
||||||
/// The control strings are defined in the module [control_strings].
|
|
||||||
ControlString,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl fmt::Debug for ControlFunctionType {
|
impl fmt::Debug for ControlFunctionType {
|
||||||
@ -159,7 +149,6 @@ impl fmt::Debug for ControlFunctionType {
|
|||||||
ControlFunctionType::IndependentControlFunction => {
|
ControlFunctionType::IndependentControlFunction => {
|
||||||
write!(f, "Independent Control Function")
|
write!(f, "Independent Control Function")
|
||||||
}
|
}
|
||||||
ControlFunctionType::ControlString => write!(f, "Control String"),
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -241,9 +230,6 @@ impl fmt::Display for ControlFunction {
|
|||||||
ControlFunctionType::IndependentControlFunction => {
|
ControlFunctionType::IndependentControlFunction => {
|
||||||
write!(f, "{}{}", c0::ESC, self.value)
|
write!(f, "{}{}", c0::ESC, self.value)
|
||||||
}
|
}
|
||||||
ControlFunctionType::ControlString => {
|
|
||||||
write!(f, "{}", self.value)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -296,10 +282,6 @@ mod tests {
|
|||||||
format!("{:?}", ControlFunctionType::IndependentControlFunction),
|
format!("{:?}", ControlFunctionType::IndependentControlFunction),
|
||||||
"Independent Control Function"
|
"Independent Control Function"
|
||||||
);
|
);
|
||||||
assert_eq!(
|
|
||||||
format!("{:?}", ControlFunctionType::ControlString),
|
|
||||||
"Control String"
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Test the debug format of [`ControlFunction`][crate::ControlFunction].
|
/// Test the debug format of [`ControlFunction`][crate::ControlFunction].
|
||||||
|
Loading…
x
Reference in New Issue
Block a user