aboutsummaryrefslogtreecommitdiff
path: root/helix-view/src/editor.rs
diff options
context:
space:
mode:
authorCole Helbling2023-11-25 12:55:49 +0000
committerGitHub2023-11-25 12:55:49 +0000
commit8b0ae3d27912799d59e4948ff11d3a5428e32ce4 (patch)
tree579190b16189202c1dbb9ef86c607e9c75616c8d /helix-view/src/editor.rs
parent090ed97e0045bfad1e5bff8b96c61707b996b85a (diff)
bump MSRV to 1.70.0 (#8877)
* rust-toolchain.toml: bump MSRV to 1.70.0 With Firefox 120 released on 21 November 2023, the MSRV is now 1.70.0. * Fix cargo fmt with Rust 1.70.0 * Fix cargo clippy with Rust 1.70.0 * Fix cargo doc with Rust 1.70.0 * rust-toolchain.toml: add clippy component * .github: bump dtolnay/rust-toolchain to 1.70 * helix-term: bump rust-version to 1.70 * helix-view/gutter: use checked_ilog10 to count digits * helix-core/syntax: use MAIN_SEPARATOR_STR constant * helix-view/handlers/dap: use Display impl for displaying process spawn error * WIP: helix-term/commands: use checked math to assert ranges cannot overlap
Diffstat (limited to 'helix-view/src/editor.rs')
-rw-r--r--helix-view/src/editor.rs11
1 files changed, 3 insertions, 8 deletions
diff --git a/helix-view/src/editor.rs b/helix-view/src/editor.rs
index 7af28ccc..5a81cb5d 100644
--- a/helix-view/src/editor.rs
+++ b/helix-view/src/editor.rs
@@ -727,7 +727,7 @@ pub struct WhitespaceCharacters {
impl Default for WhitespaceCharacters {
fn default() -> Self {
Self {
- space: '·', // U+00B7
+ space: '·', // U+00B7
nbsp: '⍽', // U+237D
tab: '→', // U+2192
newline: '⏎', // U+23CE
@@ -755,12 +755,13 @@ impl Default for IndentGuidesConfig {
}
/// Line ending configuration.
-#[derive(Debug, Copy, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Default, Debug, Copy, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "lowercase")]
pub enum LineEndingConfig {
/// The platform's native line ending.
///
/// `crlf` on Windows, otherwise `lf`.
+ #[default]
Native,
/// Line feed.
LF,
@@ -777,12 +778,6 @@ pub enum LineEndingConfig {
Nel,
}
-impl Default for LineEndingConfig {
- fn default() -> Self {
- LineEndingConfig::Native
- }
-}
-
impl From<LineEndingConfig> for LineEnding {
fn from(line_ending: LineEndingConfig) -> Self {
match line_ending {