mirror of
https://github.com/ratatui-org/ratatui
synced 2024-11-23 05:03:13 +00:00
[clippy] Fix warnings
This commit is contained in:
parent
f24517bc5a
commit
ba80889333
4 changed files with 31 additions and 30 deletions
|
@ -71,7 +71,7 @@ impl Backend for RustboxBackend {
|
|||
}
|
||||
|
||||
fn rgb_to_byte(r: u8, g: u8, b: u8) -> u16 {
|
||||
(((r & 255 & 0xC0) + ((g & 255 & 0xE0) >> 2) + ((b & 0xE0) >> 5)) & 0xFF) as u16
|
||||
u16::from((r & 0xC0) + ((g & 0xE0) >> 2) + ((b & 0xE0) >> 5))
|
||||
}
|
||||
|
||||
impl Into<rustbox::Color> for Color {
|
||||
|
|
|
@ -1,36 +1,36 @@
|
|||
pub mod block {
|
||||
pub const FULL: &'static str = "█";
|
||||
pub const SEVEN_EIGHTHS: &'static str = "▉";
|
||||
pub const THREE_QUATERS: &'static str = "▊";
|
||||
pub const FIVE_EIGHTHS: &'static str = "▋";
|
||||
pub const HALF: &'static str = "▌";
|
||||
pub const THREE_EIGHTHS: &'static str = "▍";
|
||||
pub const ONE_QUATER: &'static str = "▎";
|
||||
pub const ONE_EIGHTH: &'static str = "▏";
|
||||
pub const FULL: &str = "█";
|
||||
pub const SEVEN_EIGHTHS: &str = "▉";
|
||||
pub const THREE_QUATERS: &str = "▊";
|
||||
pub const FIVE_EIGHTHS: &str = "▋";
|
||||
pub const HALF: &str = "▌";
|
||||
pub const THREE_EIGHTHS: &str = "▍";
|
||||
pub const ONE_QUATER: &str = "▎";
|
||||
pub const ONE_EIGHTH: &str = "▏";
|
||||
}
|
||||
|
||||
pub mod bar {
|
||||
pub const FULL: &'static str = "█";
|
||||
pub const SEVEN_EIGHTHS: &'static str = "▇";
|
||||
pub const THREE_QUATERS: &'static str = "▆";
|
||||
pub const FIVE_EIGHTHS: &'static str = "▅";
|
||||
pub const HALF: &'static str = "▄";
|
||||
pub const THREE_EIGHTHS: &'static str = "▃";
|
||||
pub const ONE_QUATER: &'static str = "▂";
|
||||
pub const ONE_EIGHTH: &'static str = "▁";
|
||||
pub const FULL: &str = "█";
|
||||
pub const SEVEN_EIGHTHS: &str = "▇";
|
||||
pub const THREE_QUATERS: &str = "▆";
|
||||
pub const FIVE_EIGHTHS: &str = "▅";
|
||||
pub const HALF: &str = "▄";
|
||||
pub const THREE_EIGHTHS: &str = "▃";
|
||||
pub const ONE_QUATER: &str = "▂";
|
||||
pub const ONE_EIGHTH: &str = "▁";
|
||||
}
|
||||
|
||||
pub mod line {
|
||||
pub const TOP_RIGHT: &'static str = "┐";
|
||||
pub const VERTICAL: &'static str = "│";
|
||||
pub const HORIZONTAL: &'static str = "─";
|
||||
pub const TOP_LEFT: &'static str = "┌";
|
||||
pub const BOTTOM_RIGHT: &'static str = "┘";
|
||||
pub const BOTTOM_LEFT: &'static str = "└";
|
||||
pub const VERTICAL_LEFT: &'static str = "┤";
|
||||
pub const VERTICAL_RIGHT: &'static str = "├";
|
||||
pub const HORIZONTAL_DOWN: &'static str = "┬";
|
||||
pub const HORIZONTAL_UP: &'static str = "┴";
|
||||
pub const TOP_RIGHT: &str = "┐";
|
||||
pub const VERTICAL: &str = "│";
|
||||
pub const HORIZONTAL: &str = "─";
|
||||
pub const TOP_LEFT: &str = "┌";
|
||||
pub const BOTTOM_RIGHT: &str = "┘";
|
||||
pub const BOTTOM_LEFT: &str = "└";
|
||||
pub const VERTICAL_LEFT: &str = "┤";
|
||||
pub const VERTICAL_RIGHT: &str = "├";
|
||||
pub const HORIZONTAL_DOWN: &str = "┬";
|
||||
pub const HORIZONTAL_UP: &str = "┴";
|
||||
}
|
||||
|
||||
pub const DOT: &'static str = "•";
|
||||
pub const DOT: &str = "•";
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
/// Source: http://www.gnuplotting.org/plotting-the-world-revisited/
|
||||
/// [Source data](http://www.gnuplotting.org/plotting-the-world-revisited)
|
||||
|
||||
pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [
|
||||
(-163.71289567772871, -78.595667413241543),
|
||||
(-163.105800951163786, -78.223338718578589),
|
||||
|
|
|
@ -102,7 +102,7 @@ where
|
|||
&Style::default(),
|
||||
);
|
||||
}
|
||||
Item::StyledData(ref v, ref s) => {
|
||||
Item::StyledData(ref v, s) => {
|
||||
buf.set_stringn(
|
||||
list_area.left(),
|
||||
list_area.top() + i as u16,
|
||||
|
|
Loading…
Reference in a new issue