Add and fix some lints
This commit is contained in:
parent
06aefd562b
commit
8942b381f5
3 changed files with 13 additions and 2 deletions
|
|
@ -195,7 +195,7 @@ impl StackFrame {
|
|||
.drawable_area
|
||||
.and_then(|(da_pos, da_size)| Self::intersect_areas(da_pos, da_size, pos, size));
|
||||
|
||||
StackFrame {
|
||||
Self {
|
||||
pos,
|
||||
size,
|
||||
drawable_area,
|
||||
|
|
|
|||
11
src/lib.rs
11
src/lib.rs
|
|
@ -1,3 +1,14 @@
|
|||
#![forbid(unsafe_code)]
|
||||
// Rustc lint groups
|
||||
#![warn(future_incompatible)]
|
||||
#![warn(rust_2018_idioms)]
|
||||
#![warn(unused)]
|
||||
// Rustc lints
|
||||
#![warn(noop_method_call)]
|
||||
#![warn(single_use_lifetimes)]
|
||||
// Clippy lints
|
||||
#![warn(clippy::use_self)]
|
||||
|
||||
mod buffer;
|
||||
pub mod frame;
|
||||
pub mod styled;
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ impl Styled {
|
|||
self.then(text, ContentStyle::default())
|
||||
}
|
||||
|
||||
pub fn and_then(mut self, mut other: Styled) -> Self {
|
||||
pub fn and_then(mut self, mut other: Self) -> Self {
|
||||
let delta = self.text.len();
|
||||
for (_, until) in &mut other.styles {
|
||||
*until += delta;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue