mirror of
https://github.com/FliegendeWurst/cursive.git
synced 2024-11-09 10:50:40 +00:00
Rustfmt
This commit is contained in:
parent
a22c92a1a1
commit
5b25893496
@ -173,8 +173,9 @@ impl Printer {
|
||||
}
|
||||
|
||||
/// Returns a printer on a subset of this one's area.
|
||||
pub fn sub_printer<S: Into<Vec2>, T: Into<Vec2>>(&self, offset: S, size: T, focused: bool)
|
||||
-> Printer {
|
||||
pub fn sub_printer<S: Into<Vec2>, T: Into<Vec2>>(&self, offset: S,
|
||||
size: T, focused: bool)
|
||||
-> Printer {
|
||||
let offset = offset.into().or_min(self.size);
|
||||
Printer {
|
||||
offset: self.offset + offset,
|
||||
|
@ -80,7 +80,10 @@ impl EditView {
|
||||
|
||||
impl View for EditView {
|
||||
fn draw(&self, printer: &Printer) {
|
||||
assert!(printer.size.x == self.last_length, "Was promised {}, received {}", self.last_length, printer.size.x);
|
||||
assert!(printer.size.x == self.last_length,
|
||||
"Was promised {}, received {}",
|
||||
self.last_length,
|
||||
printer.size.x);
|
||||
|
||||
let width = self.content.width();
|
||||
printer.with_color(ColorStyle::Secondary, |printer| {
|
||||
|
@ -8,4 +8,4 @@ pub trait With: Sized {
|
||||
}
|
||||
}
|
||||
|
||||
impl <T: Sized> With for T {}
|
||||
impl<T: Sized> With for T {}
|
||||
|
Loading…
Reference in New Issue
Block a user