Fix some clippy lints
This commit is contained in:
parent
6536231dfc
commit
19ae07bd3b
5 changed files with 18 additions and 41 deletions
|
|
@ -1,10 +1,7 @@
|
|||
// SPDX-License-Identifier: MIT OR Apache-2.0
|
||||
|
||||
#[cfg(not(feature = "std"))]
|
||||
use alloc::{
|
||||
string::{String, ToString},
|
||||
vec::Vec,
|
||||
};
|
||||
use alloc::{string::String, vec::Vec};
|
||||
use core::{cmp, fmt};
|
||||
use unicode_segmentation::UnicodeSegmentation;
|
||||
|
||||
|
|
@ -54,8 +51,9 @@ impl Cursor {
|
|||
}
|
||||
|
||||
/// Whether to associate cursors placed at a boundary between runs with the run before or after it.
|
||||
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
|
||||
#[derive(Copy, Clone, Debug, Default, Eq, PartialEq, Ord, PartialOrd)]
|
||||
pub enum Affinity {
|
||||
#[default]
|
||||
Before,
|
||||
After,
|
||||
}
|
||||
|
|
@ -86,12 +84,6 @@ impl Affinity {
|
|||
}
|
||||
}
|
||||
|
||||
impl Default for Affinity {
|
||||
fn default() -> Self {
|
||||
Affinity::Before
|
||||
}
|
||||
}
|
||||
|
||||
/// The position of a cursor within a [`Buffer`].
|
||||
#[derive(Debug)]
|
||||
pub struct LayoutCursor {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue