From 1f285fbac0639215e4a776776a1c53d060a8bdf8 Mon Sep 17 00:00:00 2001 From: Florian Dehau Date: Mon, 30 Oct 2017 22:28:18 +0100 Subject: [PATCH] [src] Run cargo fmt --- src/backend/mod.rs | 2 +- src/backend/termion.rs | 7 +- src/buffer.rs | 6 +- src/layout.rs | 8 +-- src/lib.rs | 2 +- src/terminal.rs | 3 +- src/widgets/barchart.rs | 14 ++-- src/widgets/block.rs | 15 ++-- src/widgets/canvas/mod.rs | 26 +++---- src/widgets/canvas/points.rs | 4 +- src/widgets/canvas/world.rs | 130 ----------------------------------- src/widgets/gauge.rs | 11 ++- src/widgets/list.rs | 10 +-- src/widgets/mod.rs | 6 +- src/widgets/paragraph.rs | 92 +++++++++++-------------- src/widgets/sparkline.rs | 2 +- src/widgets/table.rs | 6 +- src/widgets/tabs.rs | 17 +++-- 18 files changed, 107 insertions(+), 254 deletions(-) diff --git a/src/backend/mod.rs b/src/backend/mod.rs index fe53e27..7322088 100644 --- a/src/backend/mod.rs +++ b/src/backend/mod.rs @@ -11,7 +11,7 @@ pub use self::rustbox::RustboxBackend; #[cfg(feature = "termion")] mod termion; #[cfg(feature = "termion")] -pub use self::termion::{TermionBackend, MouseBackend, RawBackend}; +pub use self::termion::{MouseBackend, RawBackend, TermionBackend}; pub trait Backend { fn draw<'a, I>(&mut self, content: I) -> Result<(), io::Error> diff --git a/src/backend/termion.rs b/src/backend/termion.rs index 58a203a..fec1938 100644 --- a/src/backend/termion.rs +++ b/src/backend/termion.rs @@ -8,7 +8,7 @@ use self::termion::raw::IntoRawMode; use super::Backend; use buffer::Cell; use layout::Rect; -use style::{Style, Color, Modifier}; +use style::{Color, Modifier, Style}; pub struct TermionBackend where @@ -18,8 +18,9 @@ where } pub type RawBackend = TermionBackend>; -pub type MouseBackend = - TermionBackend>>; +pub type MouseBackend = TermionBackend< + termion::input::MouseTerminal>, +>; impl RawBackend { pub fn new() -> Result { diff --git a/src/buffer.rs b/src/buffer.rs index dd9fcac..eb5be42 100644 --- a/src/buffer.rs +++ b/src/buffer.rs @@ -4,7 +4,7 @@ use std::usize; use unicode_segmentation::UnicodeSegmentation; use layout::Rect; -use style::{Style, Color, Modifier}; +use style::{Color, Modifier, Style}; /// A buffer cell #[derive(Debug, Clone, PartialEq)] @@ -156,8 +156,8 @@ impl Buffer { /// Returns the index in the Vec for the given (x, y) pub fn index_of(&self, x: u16, y: u16) -> usize { debug_assert!( - x >= self.area.left() && x < self.area.right() && y >= self.area.top() && - y < self.area.bottom(), + x >= self.area.left() && x < self.area.right() && y >= self.area.top() + && y < self.area.bottom(), "Trying to access position outside the buffer: x={}, y={}, area={:?}", x, y, diff --git a/src/layout.rs b/src/layout.rs index d9ddb73..f73bb2e 100644 --- a/src/layout.rs +++ b/src/layout.rs @@ -1,7 +1,7 @@ -use std::cmp::{min, max}; +use std::cmp::{max, min}; use std::collections::HashMap; -use cassowary::{Solver, Variable, Expression, Constraint}; +use cassowary::{Constraint, Expression, Solver, Variable}; use cassowary::WeightedRelation::*; use cassowary::strength::{REQUIRED, WEAK}; @@ -105,8 +105,8 @@ impl Rect { } pub fn intersects(&self, other: &Rect) -> bool { - self.x < other.x + other.width && self.x + self.width > other.x && - self.y < other.y + other.height && self.y + self.height > other.y + self.x < other.x + other.width && self.x + self.width > other.x + && self.y < other.y + other.height && self.y + self.height > other.y } } diff --git a/src/lib.rs b/src/lib.rs index c8f2ea4..ea3c818 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,8 +1,8 @@ #[macro_use] extern crate bitflags; +extern crate cassowary; #[macro_use] extern crate log; -extern crate cassowary; extern crate unicode_segmentation; extern crate unicode_width; diff --git a/src/terminal.rs b/src/terminal.rs index 0fbed79..b01c5b7 100644 --- a/src/terminal.rs +++ b/src/terminal.rs @@ -3,7 +3,7 @@ use std::collections::HashMap; use backend::Backend; use buffer::Buffer; -use layout::{Rect, Group, split}; +use layout::{split, Group, Rect}; use widgets::Widget; /// Holds a computed layout and keeps track of its use between successive draw calls @@ -114,7 +114,6 @@ where /// Flushes the current internal state and prepares the interface for the next draw call pub fn draw(&mut self) -> Result<(), io::Error> { - // Draw to stdout self.flush()?; diff --git a/src/widgets/barchart.rs b/src/widgets/barchart.rs index 7b2f5fa..262c8aa 100644 --- a/src/widgets/barchart.rs +++ b/src/widgets/barchart.rs @@ -1,8 +1,8 @@ -use std::cmp::{min, max}; +use std::cmp::{max, min}; use unicode_width::UnicodeWidthStr; -use widgets::{Widget, Block}; +use widgets::{Block, Widget}; use buffer::Buffer; use layout::Rect; use style::Style; @@ -123,9 +123,8 @@ impl<'a> Widget for BarChart<'a> { self.background(&chart_area, buf, self.style.bg); - let max = self.max.unwrap_or_else(|| { - self.data.iter().fold(0, |acc, &(_, v)| max(v, acc)) - }); + let max = self.max + .unwrap_or_else(|| self.data.iter().fold(0, |acc, &(_, v)| max(v, acc))); let max_index = min( (chart_area.width / (self.bar_width + self.bar_gap)) as usize, self.data.len(), @@ -162,7 +161,6 @@ impl<'a> Widget for BarChart<'a> { } else { d.1 = 0; } - } } @@ -172,8 +170,8 @@ impl<'a> Widget for BarChart<'a> { let width = value_label.width() as u16; if width < self.bar_width { buf.set_string( - chart_area.left() + i as u16 * (self.bar_width + self.bar_gap) + - (self.bar_width - width) / 2, + chart_area.left() + i as u16 * (self.bar_width + self.bar_gap) + + (self.bar_width - width) / 2, chart_area.bottom() - 2, value_label, &self.value_style, diff --git a/src/widgets/block.rs b/src/widgets/block.rs index e79df18..b21f9e0 100644 --- a/src/widgets/block.rs +++ b/src/widgets/block.rs @@ -1,7 +1,7 @@ use buffer::Buffer; use layout::Rect; use style::Style; -use widgets::{Widget, border}; +use widgets::{border, Widget}; use symbols::line; /// Base widget to be used with all upper level ones. It may be used to display a box border around @@ -100,7 +100,6 @@ impl<'a> Block<'a> { impl<'a> Widget for Block<'a> { fn draw(&mut self, area: &Rect, buf: &mut Buffer) { - if area.width < 2 || area.height < 2 { return; } @@ -125,17 +124,17 @@ impl<'a> Widget for Block<'a> { if self.borders.intersects(border::RIGHT) { let x = area.right() - 1; for y in area.top()..area.bottom() { - buf.get_mut(x, y).set_symbol(line::VERTICAL).set_style( - self.border_style, - ); + buf.get_mut(x, y) + .set_symbol(line::VERTICAL) + .set_style(self.border_style); } } if self.borders.intersects(border::BOTTOM) { let y = area.bottom() - 1; for x in area.left()..area.right() { - buf.get_mut(x, y).set_symbol(line::HORIZONTAL).set_style( - self.border_style, - ); + buf.get_mut(x, y) + .set_symbol(line::HORIZONTAL) + .set_style(self.border_style); } } diff --git a/src/widgets/canvas/mod.rs b/src/widgets/canvas/mod.rs index defc9ac..c8dc8ba 100644 --- a/src/widgets/canvas/mod.rs +++ b/src/widgets/canvas/mod.rs @@ -7,7 +7,7 @@ pub use self::points::Points; pub use self::line::Line; pub use self::map::{Map, MapResolution}; -use style::{Style, Color}; +use style::{Color, Style}; use buffer::Buffer; use widgets::{Block, Widget}; use layout::Rect; @@ -95,9 +95,9 @@ impl<'a> Context<'a> { let right = self.x_bounds[1]; let bottom = self.y_bounds[0]; let top = self.y_bounds[1]; - for (x, y) in shape.points().filter(|&(x, y)| { - !(x < left || x > right || y < bottom || y > top) - }) + for (x, y) in shape + .points() + .filter(|&(x, y)| !(x < left || x > right || y < bottom || y > top)) { let dy = ((top - y) * f64::from(self.height - 1) * 4.0 / (top - bottom)) as usize; let dx = ((x - left) * f64::from(self.width - 1) * 2.0 / (right - left)) as usize; @@ -241,7 +241,6 @@ where let height = canvas_area.height as usize; if let Some(ref painter) = self.painter { - // Create a blank context that match the size of the terminal let mut ctx = Context { x_bounds: self.x_bounds, @@ -278,16 +277,13 @@ where // Finally draw the labels let style = Style::default().bg(self.background_color); for label in ctx.labels.iter().filter(|l| { - !(l.x < self.x_bounds[0] || l.x > self.x_bounds[1] || l.y < self.y_bounds[0] || - l.y > self.y_bounds[1]) - }) - { - let dy = ((self.y_bounds[1] - label.y) * f64::from(canvas_area.height - 1) / - (self.y_bounds[1] - self.y_bounds[0])) as - u16; - let dx = ((label.x - self.x_bounds[0]) * f64::from(canvas_area.width - 1) / - (self.x_bounds[1] - self.x_bounds[0])) as - u16; + !(l.x < self.x_bounds[0] || l.x > self.x_bounds[1] || l.y < self.y_bounds[0] + || l.y > self.y_bounds[1]) + }) { + let dy = ((self.y_bounds[1] - label.y) * f64::from(canvas_area.height - 1) + / (self.y_bounds[1] - self.y_bounds[0])) as u16; + let dx = ((label.x - self.x_bounds[0]) * f64::from(canvas_area.width - 1) + / (self.x_bounds[1] - self.x_bounds[0])) as u16; buf.set_string( dx + canvas_area.left(), dy + canvas_area.top(), diff --git a/src/widgets/canvas/points.rs b/src/widgets/canvas/points.rs index 56df6b4..2c3f9f1 100644 --- a/src/widgets/canvas/points.rs +++ b/src/widgets/canvas/points.rs @@ -31,7 +31,9 @@ impl<'a> IntoIterator for &'a Points<'a> { type Item = (f64, f64); type IntoIter = PointsIterator<'a>; fn into_iter(self) -> Self::IntoIter { - PointsIterator { iter: self.coords.iter() } + PointsIterator { + iter: self.coords.iter(), + } } } diff --git a/src/widgets/canvas/world.rs b/src/widgets/canvas/world.rs index 76e517f..e382eea 100644 --- a/src/widgets/canvas/world.rs +++ b/src/widgets/canvas/world.rs @@ -11,7 +11,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (-163.027407803377002, -78.928773695794959), (-163.06660437727038, -78.869965915846805), (-163.71289567772871, -78.595667413241543), - (-6.197884894220991, 53.867565009163364), (-6.032985398777611, 53.153190009160497), (-6.788856573910849, 52.260117906292336), @@ -24,7 +23,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (-6.733847011736145, 55.172860012423783), (-5.661948614921968, 54.554603176483809), (-6.197884894220991, 53.867565009163364), - (141.000210402591847, -2.60015105551566), (142.735246616791471, -3.28915292726321), (144.583970982033236, -3.861417738463416), @@ -92,7 +90,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (139.184920689042883, -2.051295668143673), (139.926684198160444, -2.408999932468021), (141.000210402591847, -2.60015105551566), - (114.204016554828371, 4.525873928236805), (114.599961379048722, 4.900011298029966), (115.450710483869813, 5.447729803891534), @@ -139,7 +136,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (112.995614862115218, 3.102394924324855), (113.712935418758676, 3.893509426281156), (114.204016554828371, 4.525873928236805), - (-93.612755906940464, 74.97999726022438), (-94.156908738973911, 74.592346503386878), (-95.608680589565637, 74.666863918751758), @@ -148,7 +144,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (-94.85081987178917, 75.647217515760886), (-93.977746548217965, 75.296489569795952), (-93.612755906940464, 74.97999726022438), - (-93.840003017943985, 77.519997260234547), (-94.295608283245286, 77.491342678528682), (-96.169654100310069, 77.555111395976851), @@ -156,7 +151,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (-94.422577277386409, 77.820004787905006), (-93.720656297565895, 77.634331366680314), (-93.840003017943985, 77.519997260234547), - (-96.754398769908761, 78.765812689927017), (-95.559277920294605, 78.418314520980331), (-95.830294969449341, 78.056941229963243), @@ -166,7 +160,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (-98.631984422585532, 78.871930243638374), (-97.337231411512661, 78.831984361476756), (-96.754398769908761, 78.765812689927017), - (-88.150350307960281, 74.392307033985034), (-89.764722052758401, 74.515555325001159), (-92.422440965529461, 74.837757880340988), @@ -195,7 +188,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (-83.228893602211429, 74.564027818490942), (-86.097452358733321, 74.410032050261165), (-88.150350307960281, 74.392307033985034), - (-111.264443325630879, 78.152981879377691), (-109.854451870547109, 77.996324774884883), (-110.186938035913016, 77.697014879050343), @@ -203,7 +195,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (-113.534278937619121, 77.732206529441115), (-112.724586758253906, 78.051050116681964), (-111.264443325630879, 78.152981879377691), - (-110.963660651476019, 78.804440823065207), (-109.6631457182026, 78.601972561345647), (-110.881314256618921, 78.406945705876112), @@ -211,7 +202,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (-112.525890876091637, 78.550554511215225), (-111.500010342233395, 78.849993598130496), (-110.963660651476019, 78.804440823065207), - (-66.282434455008215, 18.514761664295364), (-65.7713028632093, 18.426679185453878), (-65.591003790942949, 18.228034979723915), @@ -221,7 +211,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (-67.242427537694354, 18.374485988839083), (-67.10067908391774, 18.520601101144351), (-66.282434455008215, 18.514761664295364), - (-77.569600796199211, 18.490525417550487), (-76.896618618462128, 18.400866807524082), (-76.365359056285541, 18.160700588447597), @@ -233,7 +222,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (-78.217726610003879, 18.454532782459196), (-77.797364671525628, 18.524218451404778), (-77.569600796199211, 18.490525417550487), - (-82.268151211257063, 23.188610744717707), (-81.404457160146833, 23.117271429938782), (-80.618768683581195, 23.106005967699151), @@ -276,7 +264,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (-83.26754757356575, 22.983041897060644), (-82.510436164057509, 23.078746649665188), (-82.268151211257063, 23.188610744717707), - (-55.600218268442056, 51.317074693397942), (-56.134035814017089, 50.687009792679277), (-56.795881720595276, 49.812308661490889), @@ -310,7 +297,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (-55.870976935435323, 51.632094224649208), (-55.406974249886588, 51.588272610065701), (-55.600218268442056, 51.317074693397942), - (-83.882626308919768, 65.109617824963536), (-82.787576870438826, 64.766693020274673), (-81.642013719392594, 64.45513580998697), @@ -331,7 +317,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (-84.975763719405919, 65.217518215588981), (-84.464012010419495, 65.37177236598022), (-83.882626308919768, 65.109617824963536), - (-78.770638597310779, 72.352199001750321), (-77.824623989559598, 72.749616604290978), (-75.605844692675731, 72.243678493937395), @@ -405,7 +390,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (-80.600087653307682, 72.716543687624167), (-80.748941616524434, 72.061906643350724), (-78.770638597310779, 72.352199001750321), - (-94.503657599652371, 74.134906724739224), (-92.420012173211731, 74.100025132942207), (-90.509792853542635, 73.856732489712059), @@ -417,7 +401,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (-96.018267991911017, 73.437429918095816), (-95.495793423224043, 73.862416897264168), (-94.503657599652371, 74.134906724739224), - (-100.438359951564109, 72.705898342572041), (-101.54, 73.36), (-100.356426968165351, 73.843865058071387), @@ -433,7 +416,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (-102.48, 72.482921284975077), (-102.48, 72.83), (-100.438359951564109, 72.705898342572041), - (-107.819433966893129, 75.845525824680962), (-106.92891984742343, 76.012828274225896), (-105.880999315192668, 75.969394232884596), @@ -456,7 +438,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (-108.54859, 76.67832), (-108.21141, 76.20168), (-107.819433966893129, 75.845525824680962), - (-122.854924486159021, 76.116542873835684), (-121.157534552883988, 76.864533393044425), (-119.103938971821094, 77.512219957174622), @@ -468,7 +449,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (-119.899316779441449, 76.053239244278146), (-121.499994269682233, 75.900018622532755), (-122.854924486159021, 76.116542873835684), - (-121.537873094552182, 74.448944403776935), (-120.109769049950103, 74.241360175260482), (-117.555635545708128, 74.18575633411443), @@ -486,7 +466,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (-123.94, 73.68), (-124.917744310386013, 74.292726548958612), (-121.537873094552182, 74.448944403776935), - (-166.467792121424623, 60.384169826897754), (-165.674429694663644, 60.293606879306253), (-165.579164191733582, 59.909986884187532), @@ -494,7 +473,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (-166.848337368821973, 59.941406155020985), (-167.455277066090076, 60.213069159579362), (-166.467792121424623, 60.384169826897754), - (-153.22872941792113, 57.96902008730477), (-152.564790615835136, 57.901427313866996), (-152.141147223906387, 57.591058661521998), @@ -504,7 +482,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (-154.670992804971178, 57.461195787172528), (-153.762779507441508, 57.81657461204373), (-153.22872941792113, 57.96902008730477), - (-132.710007697461464, 54.040009263721338), (-131.749988776559178, 54.120004380909151), (-132.049479539906741, 52.984621487024413), @@ -516,7 +493,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (-133.239665290237014, 53.851080227262237), (-133.180004849156035, 54.1699754909354), (-132.710007697461464, 54.040009263721338), - (-125.415000780114568, 49.950000515332576), (-124.920767381675091, 49.475274970083291), (-123.922507900876823, 49.062483628935794), @@ -533,7 +509,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (-126.695000169768122, 50.400903225295323), (-125.755005866378951, 50.295018215529275), (-125.415000780114568, 49.950000515332576), - (-171.731656867539442, 63.782515367275934), (-171.114433560245288, 63.592191067144952), (-170.491112433940714, 63.694975490973505), @@ -546,7 +521,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (-171.553063117538727, 63.317789211675105), (-171.791110602891223, 63.405845852300459), (-171.731656867539442, 63.782515367275934), - (-105.492289191493199, 79.301593939929163), (-103.529282396237946, 79.165349026191635), (-100.8251580472688, 78.800461737778718), @@ -558,7 +532,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (-104.210429450277132, 78.677420152491763), (-105.419580451258525, 78.918335679836488), (-105.492289191493199, 79.301593939929163), - (32.946960890440806, 35.386703396133697), (33.667227003724946, 35.373215847305516), (34.576473829900465, 35.671595567358793), @@ -569,7 +542,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (32.25666710788596, 35.103232326796629), (32.80247358575275, 35.145503648411378), (32.946960890440806, 35.386703396133697), - (26.290002882601698, 35.299990342747932), (26.164997592887659, 35.004995429009767), (24.724982130642303, 34.919987697889638), @@ -581,7 +553,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (25.769207797964185, 35.35401805270908), (25.745023227651586, 35.179997666966202), (26.290002882601698, 35.299990342747932), - (49.543518914595751, -12.469832858940554), (49.808980747279094, -12.895284925999555), (50.056510857957164, -13.555761407121985), @@ -631,13 +602,11 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (48.863508742066983, -12.487867933810421), (49.194651320193316, -12.040505059459676), (49.543518914595751, -12.469832858940554), - (167.2168013857696, -15.89184620530842), (167.84487674384502, -16.46633310309717), (167.515181105822876, -16.597849623279991), (167.180007765977791, -16.159995212470946), (167.2168013857696, -15.89184620530842), - (166.79315799384085, -15.668810723536687), (166.649859247095492, -15.392703545801211), (166.6291369977464, -14.626497084209605), @@ -645,7 +614,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (167.270028111030229, -15.740020847234888), (167.001207310247935, -15.614602146062516), (166.79315799384085, -15.668810723536687), - (134.210133905168846, -6.89523772545472), (134.112775506730941, -6.142467136259), (134.290335728085836, -5.783057549669017), @@ -653,7 +621,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (134.727001580952162, -5.737582289252167), (134.724624465066711, -6.214400730009288), (134.210133905168846, -6.89523772545472), - (-48.660616014182523, -78.047018731598726), (-48.1513964503784, -78.047070408031018), (-46.662856818210983, -77.831476332509325), @@ -675,7 +642,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (-49.914131232286493, -78.811209812330944), (-49.306958991073117, -78.458569838371204), (-48.660616014182523, -78.047018731598726), - (-66.29003089055513, -80.255772800617976), (-64.037687750897675, -80.294891859862929), (-61.883245612217181, -80.392870375488314), @@ -689,7 +655,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (-65.741666429289907, -80.5888274067391), (-65.741666429289907, -80.549656671061854), (-66.29003089055513, -80.255772800617976), - (-73.915818651002297, -71.269344577925779), (-73.23033077665059, -71.151780694461763), (-72.07471655952358, -71.190951430139009), @@ -715,7 +680,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (-74.953894822881452, -72.072758070767534), (-75.012625088181167, -71.661258640427349), (-73.915818651002297, -71.269344577925779), - (-102.330725063876386, -71.894164320766819), (-101.703967454824408, -71.71779265735465), (-100.430918545314086, -71.854993585089574), @@ -729,7 +693,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (-100.783455166409254, -72.50162078235779), (-101.801868455801369, -72.305663751107005), (-102.330725063876386, -71.894164320766819), - (-122.621734585441928, -73.65777760202387), (-122.406243862784819, -73.324619643038162), (-121.211510586412857, -73.500991306450331), @@ -739,7 +702,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (-120.23221635626571, -74.088810723770393), (-121.622829149240019, -74.010469252415916), (-122.621734585441928, -73.65777760202387), - (-127.283129645681925, -73.461768894340793), (-126.558471035652985, -73.246226495251392), (-125.559565599451076, -73.481354262179423), @@ -747,7 +709,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (-124.619467943197321, -73.834097589003747), (-125.91217973519467, -73.736119073378347), (-127.283129645681925, -73.461768894340793), - (165.779989862326374, -21.080004978115628), (166.599991489933842, -21.700018812753527), (167.120011428086912, -22.159990736583492), @@ -761,7 +722,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (165.02003624904205, -20.45999114347773), (165.46000939357512, -20.80002206795826), (165.779989862326374, -21.080004978115628), - (152.640016717742526, -3.659983005389691), (153.019993524384688, -3.980015150573265), (153.14003787659874, -4.499983412294092), @@ -776,7 +736,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (151.820015090135087, -2.999971612157886), (152.239989455371131, -3.24000864015364), (152.640016717742526, -3.659983005389691), - (151.301390415653884, -5.840728448106752), (150.754447056276661, -6.083711032743138), (150.241196730753813, -6.317753594593028), @@ -799,14 +758,12 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (151.982795851854519, -5.478063246282382), (151.459106887008659, -5.560280450058754), (151.301390415653884, -5.840728448106752), - (162.119024693040899, -10.482719008021149), (162.398645868172196, -10.826367282762106), (161.700032180018354, -10.820011081590211), (161.319796991214758, -10.204751478723168), (161.917383254238018, -10.446648858281423), (162.119024693040899, -10.482719008021149), - (161.679981724289121, -9.599982191611367), (161.529396600590587, -9.784312025596485), (160.788253208660535, -8.917543226764892), @@ -814,7 +771,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (160.920028111004854, -8.32000864017396), (161.280006138349989, -9.120011488484451), (161.679981724289121, -9.599982191611367), - (160.852228631837875, -9.872937106977048), (160.4625883323572, -9.895209649294841), (159.849447463214119, -9.794027194867354), @@ -823,7 +779,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (160.362956170898428, -9.400304457235571), (160.688517694337236, -9.610162448772869), (160.852228631837875, -9.872937106977048), - (159.640002883135139, -8.020026950719632), (159.875027297198585, -8.337320244991737), (159.917401971677918, -8.538289890174831), @@ -833,7 +788,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (158.359977655265425, -7.320017998893917), (158.8200012555277, -7.560003350457379), (159.640002883135139, -8.020026950719632), - (157.140000441718882, -7.021638278840641), (157.538425734689213, -7.347819919466943), (157.339419793933246, -7.404767347852592), @@ -841,7 +795,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (156.491357863591304, -6.765943291860452), (156.542827590153991, -6.599338474151452), (157.140000441718882, -7.021638278840641), - (154.759990676084385, -5.339983819198495), (155.062917922179338, -5.56679168052753), (155.547746209941693, -6.200654799019645), @@ -853,7 +806,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (154.514114211239644, -5.139117526879986), (154.652503696917279, -5.042379245629597), (154.759990676084385, -5.339983819198495), - (176.8858236026052, -40.065977878582203), (176.508017206119263, -40.60475636165728), (176.012440220440226, -41.289624118821472), @@ -890,7 +842,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (176.939980503647064, -39.449736423501612), (177.032946405340113, -39.879942722331464), (176.8858236026052, -40.065977878582203), - (169.667814569373149, -43.555325616226376), (170.524919875366152, -43.031688327812816), (171.125089960004004, -42.512753594737823), @@ -921,7 +872,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (168.303763462596862, -44.123973077166141), (168.949408807651565, -43.935819187191434), (169.667814569373149, -43.555325616226376), - (147.689259474884182, -40.808258152022674), (148.289067824495987, -40.875437514002108), (148.35986453673587, -42.062393487314147), @@ -939,7 +889,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (146.364120721623692, -41.137643731451085), (146.908583612250879, -41.000546156580732), (147.689259474884182, -40.808258152022674), - (126.148713820501143, -32.215966078420593), (125.088623488465657, -32.72875131605285), (124.221647983904916, -32.959486586236068), @@ -1164,7 +1113,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (128.240937534702255, -31.948488864877852), (127.102867466338296, -32.282266941051063), (126.148713820501143, -32.215966078420593), - (81.787959018891399, 7.523055324733164), (81.637322218760588, 6.481775214051922), (81.218019647144331, 6.197141424988288), @@ -1175,7 +1123,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (80.838817986986555, 9.268426825391188), (81.304319289071771, 8.56420624433369), (81.787959018891399, 7.523055324733164), - (129.370997756060945, -2.802154229344595), (130.471344028851775, -3.093764336767634), (130.834836053592824, -3.858472181822776), @@ -1185,14 +1132,12 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (127.898891229362349, -3.393435967628207), (128.135879347852836, -2.843650404474971), (129.370997756060945, -2.802154229344595), - (126.874922723498855, -3.790931084817302), (126.183802118027359, -3.607376397316564), (125.989033644719257, -3.177221774919012), (127.000651483264974, -3.129317722184446), (127.249215122588907, -3.45906503663889), (126.874922723498855, -3.790931084817302), - (127.932377557487484, 2.174596258956569), (128.004156121940866, 1.628531398928345), (128.594559360875508, 1.540810655112878), @@ -1206,7 +1151,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (127.399490187693686, 1.011721503092545), (127.600511509309058, 1.810690822757195), (127.932377557487484, 2.174596258956569), - (122.927566766451804, 0.875192368977409), (124.077522414242878, 0.917101955566125), (125.065989211121803, 1.64325918213153), @@ -1252,7 +1196,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (120.885779250167616, 1.30922272379685), (121.666816847826965, 1.013943589681091), (122.927566766451804, 0.875192368977409), - (120.295014276206885, -10.258649997603591), (118.967808465654713, -9.557969252158074), (119.900309686361567, -9.361340427287502), @@ -1260,7 +1203,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (120.775501743656747, -9.969675388227429), (120.715608758630452, -10.239581394087885), (120.295014276206885, -10.258649997603591), - (121.341668735846511, -8.536739597206072), (122.007364536630433, -8.460620212440148), (122.903537225436068, -8.094234307490765), @@ -1270,7 +1212,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (119.920928582846045, -8.444858900591122), (120.715091994307571, -8.236964613480914), (121.341668735846511, -8.536739597206072), - (118.260616489740443, -8.362383314653293), (118.878459914222077, -8.280682875199844), (119.126506789223072, -8.705824883665088), @@ -1281,7 +1222,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (117.632024367342098, -8.449303073768228), (117.900018345207755, -8.095681247594939), (118.260616489740443, -8.362383314653293), - (108.486846144649263, -6.42198495852574), (108.623478631628956, -6.777673841990705), (110.539227329553285, -6.877357679881726), @@ -1305,7 +1245,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (107.265008579540194, -5.954985039904081), (108.072091099074669, -6.345762220895224), (108.486846144649263, -6.42198495852574), - (104.369991489684892, -1.084843031421059), (104.539490187602212, -1.782371514496766), (104.887892694114015, -2.340425306816705), @@ -1341,14 +1280,12 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (103.437645298274902, -0.711945896002902), (104.010788608824043, -1.059211521004286), (104.369991489684892, -1.084843031421059), - (120.833896112146562, 12.704496161342433), (120.323436313967449, 13.466413479053825), (121.180128208502111, 13.429697373910443), (121.527393833503496, 13.069590155484519), (121.262190382981586, 12.205560207564403), (120.833896112146562, 12.704496161342433), - (122.5860889018671, 9.981044826696134), (122.837081333508749, 10.26118276615037), (122.947410516451896, 10.881868394408061), @@ -1361,7 +1298,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (122.9958313335094, 9.022188625520414), (122.38005496631942, 9.713360907424217), (122.5860889018671, 9.981044826696134), - (126.376813592637447, 8.414706325713297), (126.478512811387887, 7.750354112168978), (126.537423944200611, 7.189406439640692), @@ -1389,7 +1325,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (126.2227144715431, 9.286074327018866), (126.306636997585144, 8.782487494334561), (126.376813592637447, 8.414706325713297), - (109.475209588663645, 18.197700913968575), (108.655207961056163, 18.507681993071387), (108.62621748254044, 19.367887885001906), @@ -1400,7 +1335,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (110.570646600386766, 19.255879218009269), (110.339187860151469, 18.678395087147592), (109.475209588663645, 18.197700913968575), - (121.777817824389928, 24.3942735865194), (121.175632358892742, 22.790857245367167), (120.747079705896226, 21.970571397382113), @@ -1410,7 +1344,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (121.495044386888779, 25.295458889257386), (121.951243931161457, 24.997595933527037), (121.777817824389928, 24.3942735865194), - (141.884600864834965, 39.180864569651476), (140.959489373945814, 38.174000962876619), (140.976335890872974, 37.142074286440192), @@ -1448,7 +1381,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (141.36897342342661, 41.378559882160275), (141.914263136970476, 39.991616115878685), (141.884600864834965, 39.180864569651476), - (144.613426548439634, 43.960908718433608), (145.320825230083074, 44.384732977875409), (145.543137241802697, 43.262114162766764), @@ -1465,7 +1397,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (143.142870314709739, 44.510358384776971), (143.910161981379474, 44.174099839853739), (144.613426548439634, 43.960908718433608), - (8.709990675500109, 40.899984442705225), (9.210011834356266, 41.209991360024176), (9.80997521326492, 40.500008856766129), @@ -1476,7 +1407,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (8.388253208050912, 40.378310858718763), (8.159998406617689, 40.950007229163759), (8.709990675500109, 40.899984442705225), - (8.746009148807559, 42.628121853193917), (9.390000848028876, 43.00998484961471), (9.560016310269134, 42.152517808595654), @@ -1484,14 +1414,12 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (8.775723097375362, 41.583611965494427), (8.544212680707773, 42.256542466799203), (8.746009148807559, 42.628121853193917), - (12.370904168353292, 56.111407375708794), (12.690006137755603, 55.609990953180741), (12.089991082414684, 54.800014553437919), (11.043543328504226, 55.36486379660424), (10.903913608451603, 55.779954738988721), (12.370904168353292, 56.111407375708794), - (-4.211494513353671, 58.550845038478968), (-3.005004848635309, 58.635000108466286), (-4.073828497728101, 57.553024807355186), @@ -1536,7 +1464,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (-5.786824713555276, 57.818848375064576), (-5.009998745127689, 58.63001333275011), (-4.211494513353671, 58.550845038478968), - (-14.508695441129234, 66.455892239031428), (-14.739637417041607, 65.808748277440301), (-13.60973222497981, 65.126671047619865), @@ -1557,7 +1484,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (-17.798623826559052, 65.993853257909777), (-16.167818976292125, 66.526818142352013), (-14.508695441129234, 66.455892239031428), - (142.914615513276544, 53.704577541714784), (143.260847609632094, 52.740760403039062), (143.235267775647628, 51.756660264688762), @@ -1580,7 +1506,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (142.209748976815433, 54.225475979216874), (142.654786411713019, 54.365880845753892), (142.914615513276544, 53.704577541714784), - (118.504580926590364, 9.316382554558047), (117.174274530100661, 8.367499904814679), (117.664477166821371, 9.066888739452892), @@ -1590,7 +1515,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (119.689676548339889, 10.554291490109875), (119.029458449378922, 10.003653265823829), (118.504580926590364, 9.316382554558047), - (122.336956821787993, 18.224882717354106), (122.174279412933174, 17.810282701076403), (122.515653924653293, 17.093504746971973), @@ -1624,7 +1548,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (121.937601353036399, 18.218552354398355), (122.246006300954292, 18.478975734933243), (122.336956821787993, 18.224882717354106), - (122.038370396005547, 11.415840969279998), (121.883547804859091, 11.891755072471994), (122.483821242361486, 11.582213243043682), @@ -1634,7 +1557,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (122.002610304859573, 10.441016750526089), (121.967366978036523, 10.905691229694625), (122.038370396005547, 11.415840969279998), - (125.502551711123544, 12.162694606978292), (125.783413120629916, 11.046147772663929), (125.01188398651226, 11.311454576050409), @@ -1649,7 +1571,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (124.266761509295691, 12.557760931849671), (125.227116327007877, 12.53572093347718), (125.502551711123544, 12.162694606978292), - (-77.353360765273862, 8.67050466555807), (-76.836673957003569, 8.638749497914716), (-76.086383836557857, 9.336820583529487), @@ -1895,7 +1816,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (-77.318815070286746, 5.84535411216136), (-77.47666073272228, 6.691116441266303), (-77.881571417945253, 7.223771267114785), - (-74.662543097619874, -52.837498060924958), (-73.838097296835315, -53.047407728894548), (-72.434177822545848, -53.715377292699308), @@ -1920,7 +1840,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (-72.263903978144128, -54.495122979551383), (-73.285211147744576, -53.957533054419024), (-74.662543097619874, -52.837498060924958), - (44.846958042181143, 80.589809882317141), (46.799138624871233, 80.771917629713684), (48.318477410684608, 80.784009914869984), @@ -1936,7 +1855,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (46.502825962109632, 80.247246812654296), (47.072455275262939, 80.559424140129508), (44.846958042181143, 80.589809882317141), - (53.50828982932515, 73.749813951300197), (55.902458937407658, 74.627486477345357), (55.631932814359686, 75.081412258597183), @@ -1963,7 +1881,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (52.444168735570877, 72.774731350384812), (54.427613559797578, 73.6275475124976), (53.50828982932515, 73.749813951300197), - (27.407505730913446, 80.056405748200419), (25.92465050629815, 79.517833970854511), (23.024465773213617, 79.40003754344518), @@ -1976,7 +1893,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (22.919252557067381, 80.657144273593431), (25.447625359811866, 80.407340399894522), (27.407505730913446, 80.056405748200419), - (24.724103631293332, 77.853852851056175), (22.490338169044833, 77.444937242330596), (20.726001417735688, 77.677041937969548), @@ -1985,7 +1901,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (22.884267612405779, 78.454953111475263), (23.281349318136538, 78.079523830874805), (24.724103631293332, 77.853852851056175), - (15.142827996489387, 79.674310207834296), (15.522546420970059, 80.016098131012754), (16.990828891679058, 80.050876369945186), @@ -2004,7 +1919,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (13.170751987366913, 80.010465399892936), (13.718522169660758, 79.660409247547776), (15.142827996489387, 79.674310207834296), - (-77.881571417945253, 7.223771267114785), (-78.214936082660117, 7.512254950384161), (-78.429160732726075, 8.052041123888927), @@ -2696,7 +2610,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (-78.055927700498017, 9.247730414258299), (-77.729513515926413, 8.946844387238869), (-77.353360765273862, 8.67050466555807), - (-71.712361416292964, 19.714455878167357), (-71.587304450146632, 19.8849105900821), (-71.380004442007788, 19.904986884027494), @@ -2734,7 +2647,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (-73.189790615517623, 19.915683905511912), (-72.579672817663621, 19.871500555902358), (-71.712361416292964, 19.714455878167357), - (14.761249220446189, 38.143873602850462), (15.520324334381513, 38.231180935207576), (15.160242954171736, 37.444045518537763), @@ -2746,11 +2658,9 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (12.570943637755136, 38.126381130519661), (13.741156447004613, 38.034965521795328), (14.761249220446189, 38.143873602850462), - (37.539135369625853, 44.657222805350479), (38.679995965333546, 44.279984849619794), (39.955008579270924, 43.434997666999223), - (132.371176385630235, 33.463642483040061), (132.924372593314729, 34.060298570282043), (133.492968377822194, 33.944620876596673), @@ -2763,7 +2673,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (133.014858026257798, 32.704567369104737), (132.363114862192674, 32.989382025681394), (132.371176385630235, 33.463642483040061), - (180.000000441810386, 68.963646145291463), (178.599982538158855, 69.400001939564035), (175.72403, 69.87725), @@ -4062,15 +3971,12 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (177.41128, 64.60821), (178.7072, 64.53493), (180.0, 64.979708702198408), - (-177.550009732146037, 68.199997667098287), (-179.999989387103767, 68.963646145291463), - (-179.999989387103767, -16.067132663642447), (-179.793309496152403, -16.020882256741224), (-179.917358771869033, -16.501783135649397), (-179.999989387103767, -16.555216566639196), - (125.947072381698263, -8.432094821815035), (126.644704217638548, -8.398246758663852), (126.957243280139835, -8.273344821814398), @@ -4086,7 +3992,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (124.968682489116233, -8.892790215697083), (125.086246372580263, -8.65688730228468), (125.947072381698263, -8.432094821815035), - (-180.0, 68.963636363636354), (-177.550009732146037, 68.199997667098287), (-174.92825, 67.20589), @@ -4110,7 +4015,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (-179.88377, 65.87456), (-179.43268, 65.40411), (-180.0, 64.979708702198394), - (-180.0, 71.515714336428275), (-179.87187, 71.55762), (-179.02433, 71.55553), @@ -4118,12 +4022,10 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (-177.663575, 71.13277), (-178.69378, 70.89302), (-180.0, 70.832199208546726), - (180.0, 70.832199208546726), (178.903425, 70.78114), (178.7253, 71.0988), (180.0, 71.515714336428289), - (180.0, -16.555216566639196), (179.364142661964138, -16.801354076946883), (178.725059362997115, -17.012041674368039), @@ -4131,7 +4033,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (179.0966093629971, -16.433984277547403), (179.413509362997104, -16.379054277547404), (180.0, -16.067132663642447), - (-61.2, -51.85), (-60.0, -51.25), (-59.15, -51.5), @@ -4142,7 +4043,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (-59.85, -51.85), (-60.7, -52.3), (-61.2, -51.85), - (68.935, -48.625), (69.58, -48.94), (70.525, -49.065), @@ -4152,7 +4052,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (68.72, -49.2425), (68.8675, -48.83), (68.935, -48.625), - (178.12557, -17.50481), (178.3736, -17.33992), (178.71806, -17.62846), @@ -4162,7 +4061,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (177.28504, -17.72465), (177.67087, -17.38114), (178.12557, -17.50481), - (-61.68, 10.76), (-61.105, 10.89), (-60.895, 10.855), @@ -4171,7 +4069,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (-61.95, 10.09), (-61.66, 10.365), (-61.68, 10.76), - (-155.40214, 20.07975), (-155.22452, 19.99302), (-155.06226, 19.8591), @@ -4189,7 +4086,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (-155.86108, 20.26721), (-155.78505, 20.2487), (-155.40214, 20.07975), - (-155.99566, 20.76404), (-156.07926, 20.64397), (-156.41445, 20.57241), @@ -4199,13 +4095,11 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (-156.61258, 21.01249), (-156.25711, 20.91745), (-155.99566, 20.76404), - (-156.75824, 21.17684), (-156.78933, 21.06873), (-157.32521, 21.09777), (-157.25027, 21.21958), (-156.75824, 21.17684), - (-158.0252, 21.71696), (-157.94161, 21.65272), (-157.65283, 21.32217), @@ -4215,7 +4109,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (-158.2538, 21.53919), (-158.29265, 21.57912), (-158.0252, 21.71696), - (-159.36569, 22.21494), (-159.34512, 21.982), (-159.46372, 21.88299), @@ -4223,7 +4116,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (-159.74877, 22.1382), (-159.5962, 22.23618), (-159.36569, 22.21494), - (-78.19087, 25.2103), (-77.89, 25.17), (-77.54, 24.34), @@ -4232,14 +4124,12 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (-78.03405, 24.28615), (-78.40848, 24.57564), (-78.19087, 25.2103), - (-78.98, 26.79), (-78.51, 26.87), (-77.85, 26.84), (-77.82, 26.58), (-78.91, 26.42), (-78.98, 26.79), - (-77.79, 27.04), (-77.0, 26.59), (-77.17255, 25.87918), @@ -4247,7 +4137,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (-77.34, 26.53), (-77.78802, 26.92516), (-77.79, 27.04), - (-64.01486, 47.03601), (-63.6645, 46.55001), (-62.9393, 46.41587), @@ -4257,7 +4146,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (-64.1428, 46.39265), (-64.39261, 46.72747), (-64.01486, 47.03601), - (46.68201, 44.6092), (47.67591, 45.64149), (48.64541, 45.80629), @@ -4310,7 +4198,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (47.49252, 42.98658), (47.59094, 43.66016), (46.68201, 44.6092), - (-64.51912, 49.87304), (-64.17322, 49.95718), (-62.85829, 49.70641), @@ -4319,7 +4206,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (-62.29318, 49.08717), (-63.58926, 49.40069), (-64.51912, 49.87304), - (-80.315395, 62.085565), (-79.92939, 62.3856), (-79.52002, 62.36371), @@ -4328,7 +4214,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (-80.09956, 61.7181), (-80.36215, 62.01649), (-80.315395, 62.085565), - (-83.99367, 62.4528), (-83.25048, 62.91409), (-81.87699, 62.90458), @@ -4336,7 +4221,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (-83.06857, 62.15922), (-83.77462, 62.18231), (-83.99367, 62.4528), - (-75.21597, 67.44425), (-75.86588, 67.14886), (-76.98687, 67.09873), @@ -4346,7 +4230,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (-75.1145, 68.01036), (-75.10333, 67.58202), (-75.21597, 67.44425), - (-96.557401203800524, 69.680030358321773), (-95.647688645579422, 69.10769485484937), (-96.269511155347473, 68.757044423532847), @@ -4357,7 +4240,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (-98.218255255290174, 70.143523101923819), (-97.157401203800546, 69.860030358321779), (-96.557401203800524, 69.680030358321773), - (-106.52258806031243, 73.07600495064645), (-105.402449713953743, 72.672592881959986), (-104.774839443768968, 71.698414618609689), @@ -4403,7 +4285,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (-108.396401333431911, 73.089544175906951), (-107.516455044365841, 73.235995185022034), (-106.52258806031243, 73.07600495064645), - (-79.775833129882812, 72.802902221679744), (-80.8760986328125, 73.333183288574219), (-80.833885192871136, 73.693183898925781), @@ -4415,7 +4296,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (-78.391670227050781, 72.876655578613281), (-79.48625183105473, 72.742202758789062), (-79.775833129882812, 72.802902221679744), - (139.86312, 73.36983), (140.81171, 73.76506), (142.06207, 73.85758), @@ -4424,7 +4304,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (142.08763, 73.20544), (140.038155, 73.31692), (139.86312, 73.36983), - (148.22223, 75.345845), (150.73167, 75.08406), (149.575925, 74.68892), @@ -4432,7 +4311,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (146.11919, 75.17298), (146.358485, 75.49682), (148.22223, 75.345845), - (138.831075, 76.13676), (141.471615, 76.09289), (145.086285, 75.562625), @@ -4442,7 +4320,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (136.97439, 75.26167), (137.51176, 75.94917), (138.831075, 76.13676), - (-98.577000698626961, 76.588607082821966), (-98.5, 76.72), (-97.735585, 76.25656), @@ -4456,7 +4333,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (-101.489742804758421, 76.305368557430228), (-99.983478156314902, 76.646329657692007), (-98.577000698626961, 76.588607082821966), - (102.837815, 79.28129), (105.37243, 78.71334), (105.07547, 78.30689), @@ -4464,7 +4340,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (101.2649, 79.23399), (102.08635, 79.34641), (102.837815, 79.28129), - (93.77766, 81.0246), (95.94089, 81.2504), (97.88385, 80.746975), @@ -4476,7 +4351,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (92.5454, 80.14379), (91.18107, 80.34146), (93.77766, 81.0246), - (-96.016433478564679, 80.60231557893178), (-95.323452521530669, 80.907284044102198), (-94.298424648805195, 80.977279771641605), @@ -4497,7 +4371,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (-96.076145596077893, 79.705006008615669), (-96.709724494192415, 80.157769070140972), (-96.016433478564679, 80.60231557893178), - (-91.58702, 81.89429), (-90.1, 82.085), (-88.93227, 82.11751), @@ -4563,7 +4436,6 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (-90.2, 81.26), (-91.36786, 81.5531), (-91.58702, 81.89429), - (-46.76379, 82.62796), (-43.40644, 83.22516), (-39.89753, 83.18018), @@ -4696,14 +4568,12 @@ pub static WORLD_HIGH_RESOLUTION: [(f64, f64); 5125] = [ (-44.523, 81.6607), (-46.9007, 82.19979), (-46.76379, 82.62796), - (-106.6, 73.6), (-105.26, 73.64), (-104.5, 73.42), (-105.38, 72.76), (-106.94, 73.46), (-106.6, 73.6), - (-180.0, -84.71338), (-179.942499356179042, -84.721443373552503), (-179.058677334691168, -84.139411716649136), diff --git a/src/widgets/gauge.rs b/src/widgets/gauge.rs index c6b0aa0..c635128 100644 --- a/src/widgets/gauge.rs +++ b/src/widgets/gauge.rs @@ -1,8 +1,8 @@ use unicode_width::UnicodeWidthStr; -use widgets::{Widget, Block}; +use widgets::{Block, Widget}; use buffer::Buffer; -use style::{Style, Color}; +use style::{Color, Style}; use layout::Rect; /// A widget to display a task progress. @@ -81,7 +81,6 @@ impl<'a> Widget for Gauge<'a> { let width = (gauge_area.width * self.percent) / 100; let end = gauge_area.left() + width; for y in gauge_area.top()..gauge_area.bottom() { - // Gauge for x in gauge_area.left()..end { buf.get_mut(x, y).set_symbol(" "); @@ -98,9 +97,9 @@ impl<'a> Widget for Gauge<'a> { // Fix colors for x in gauge_area.left()..end { - buf.get_mut(x, y).set_fg(self.style.bg).set_bg( - self.style.fg, - ); + buf.get_mut(x, y) + .set_fg(self.style.bg) + .set_bg(self.style.fg); } } } diff --git a/src/widgets/list.rs b/src/widgets/list.rs index fbb798c..463de42 100644 --- a/src/widgets/list.rs +++ b/src/widgets/list.rs @@ -5,7 +5,7 @@ use std::iter::Iterator; use unicode_width::UnicodeWidthStr; use buffer::Buffer; -use widgets::{Widget, Block}; +use widgets::{Block, Widget}; use layout::Rect; use style::Style; @@ -87,9 +87,10 @@ where self.background(&list_area, buf, self.style.bg); - for (i, item) in self.items.by_ref().enumerate().take( - list_area.height as usize, - ) + for (i, item) in self.items + .by_ref() + .enumerate() + .take(list_area.height as usize) { match item { Item::Data(ref v) => { @@ -199,7 +200,6 @@ impl<'b> SelectableList<'b> { impl<'b> Widget for SelectableList<'b> { fn draw(&mut self, area: &Rect, buf: &mut Buffer) { - let list_area = match self.block { Some(ref mut b) => b.inner(area), None => *area, diff --git a/src/widgets/mod.rs b/src/widgets/mod.rs index e95d948..039a419 100644 --- a/src/widgets/mod.rs +++ b/src/widgets/mod.rs @@ -11,13 +11,13 @@ pub mod canvas; pub use self::block::Block; pub use self::paragraph::Paragraph; -pub use self::list::{List, Item, SelectableList}; +pub use self::list::{Item, List, SelectableList}; pub use self::gauge::Gauge; pub use self::sparkline::Sparkline; -pub use self::chart::{Chart, Axis, Dataset, Marker}; +pub use self::chart::{Axis, Chart, Dataset, Marker}; pub use self::barchart::BarChart; pub use self::tabs::Tabs; -pub use self::table::{Table, Row}; +pub use self::table::{Row, Table}; use buffer::Buffer; use layout::Rect; diff --git a/src/widgets/paragraph.rs b/src/widgets/paragraph.rs index e86d2d7..12ad8df 100644 --- a/src/widgets/paragraph.rs +++ b/src/widgets/paragraph.rs @@ -1,10 +1,10 @@ use unicode_segmentation::UnicodeSegmentation; use unicode_width::UnicodeWidthStr; -use widgets::{Widget, Block}; +use widgets::{Block, Widget}; use buffer::Buffer; use layout::Rect; -use style::{Style, Color, Modifier}; +use style::{Color, Modifier, Style}; /// A widget to display some text. You can specify colors using commands embedded in /// the text such as "{[color] [text]}". @@ -117,21 +117,15 @@ where let args = cmd.split('=').collect::>(); if let Some(first) = args.get(0) { match *first { - "fg" => { - if let Some(snd) = args.get(1) { - self.style.fg = Parser::::str_to_color(snd); - } - } - "bg" => { - if let Some(snd) = args.get(1) { - self.style.bg = Parser::::str_to_color(snd); - } - } - "mod" => { - if let Some(snd) = args.get(1) { - self.style.modifier = Parser::::str_to_modifier(snd); - } - } + "fg" => if let Some(snd) = args.get(1) { + self.style.fg = Parser::::str_to_color(snd); + }, + "bg" => if let Some(snd) = args.get(1) { + self.style.bg = Parser::::str_to_color(snd); + }, + "mod" => if let Some(snd) = args.get(1) { + self.style.modifier = Parser::::str_to_modifier(snd); + }, _ => {} } } @@ -184,43 +178,41 @@ where type Item = (&'a str, Style); fn next(&mut self) -> Option { match self.text.next() { - Some(s) => { - if s == "\\" { - if self.escaping { - Some((s, self.style)) - } else { - self.escaping = true; - self.next() - } - } else if s == "{" { - if self.escaping { - self.escaping = false; - Some((s, self.style)) - } else if self.mark { - Some((s, self.style)) - } else { - self.style = self.base_style; - self.mark = true; - self.next() - } - } else if s == "}" && self.mark { - self.reset(); - self.next() - } else if s == " " && self.mark { - if self.styling { - Some((s, self.style)) - } else { - self.styling = true; - self.update_style(); - self.next() - } - } else if self.mark && !self.styling { - self.cmd_string.push_str(s); + Some(s) => if s == "\\" { + if self.escaping { + Some((s, self.style)) + } else { + self.escaping = true; self.next() + } + } else if s == "{" { + if self.escaping { + self.escaping = false; + Some((s, self.style)) + } else if self.mark { + Some((s, self.style)) } else { + self.style = self.base_style; + self.mark = true; + self.next() + } + } else if s == "}" && self.mark { + self.reset(); + self.next() + } else if s == " " && self.mark { + if self.styling { Some((s, self.style)) + } else { + self.styling = true; + self.update_style(); + self.next() } - } + } else if self.mark && !self.styling { + self.cmd_string.push_str(s); + self.next() + } else { + Some((s, self.style)) + }, None => None, } } diff --git a/src/widgets/sparkline.rs b/src/widgets/sparkline.rs index 8f2d0d3..ae79de3 100644 --- a/src/widgets/sparkline.rs +++ b/src/widgets/sparkline.rs @@ -2,7 +2,7 @@ use std::cmp::min; use layout::Rect; use buffer::Buffer; -use widgets::{Widget, Block}; +use widgets::{Block, Widget}; use style::Style; use symbols::bar; diff --git a/src/widgets/table.rs b/src/widgets/table.rs index 9f580f7..90066b2 100644 --- a/src/widgets/table.rs +++ b/src/widgets/table.rs @@ -2,7 +2,7 @@ use std::fmt::Display; use std::iter::Iterator; use buffer::Buffer; -use widgets::{Widget, Block}; +use widgets::{Block, Widget}; use layout::Rect; use style::Style; @@ -72,8 +72,7 @@ where H: Iterator + Default, I: Display, D: Iterator, - R: Iterator> - + Default, + R: Iterator> + Default, { fn default() -> Table<'a, 'i, T, H, I, D, R> { Table { @@ -159,7 +158,6 @@ where R: Iterator>, { fn draw(&mut self, area: &Rect, buf: &mut Buffer) { - // Render block if necessary and get the drawing area let table_area = match self.block { Some(ref mut b) => { diff --git a/src/widgets/tabs.rs b/src/widgets/tabs.rs index ef90390..f0511b4 100644 --- a/src/widgets/tabs.rs +++ b/src/widgets/tabs.rs @@ -76,7 +76,6 @@ impl<'a> Tabs<'a> { impl<'a> Widget for Tabs<'a> { fn draw(&mut self, area: &Rect, buf: &mut Buffer) { - let tabs_area = match self.block { Some(ref mut b) => { b.draw(area, buf); @@ -92,14 +91,14 @@ impl<'a> Widget for Tabs<'a> { self.background(&tabs_area, buf, self.style.bg); let mut x = tabs_area.left(); - for (title, style) in self.titles.iter().enumerate().map(|(i, t)| if i == - self.selected - { - (t, &self.highlight_style) - } else { - (t, &self.style) - }) - { + for (title, style) in self.titles + .iter() + .enumerate() + .map(|(i, t)| if i == self.selected { + (t, &self.highlight_style) + } else { + (t, &self.style) + }) { x += 1; if x > tabs_area.right() { break;