Appease clippy
This commit is contained in:
@@ -4,7 +4,7 @@ use lazy_static::lazy_static;
|
||||
|
||||
lazy_static! {
|
||||
pub static ref RELEASE_CHANNEL_NAME: String = env::var("ZED_RELEASE_CHANNEL")
|
||||
.unwrap_or(include_str!("../../zed/RELEASE_CHANNEL").to_string());
|
||||
.unwrap_or_else(|_| include_str!("../../zed/RELEASE_CHANNEL").to_string());
|
||||
pub static ref RELEASE_CHANNEL: ReleaseChannel = match RELEASE_CHANNEL_NAME.as_str() {
|
||||
"dev" => ReleaseChannel::Dev,
|
||||
"preview" => ReleaseChannel::Preview,
|
||||
|
||||
@@ -36,7 +36,7 @@ pub fn truncate_and_trailoff(s: &str, max_chars: usize) -> String {
|
||||
debug_assert!(max_chars >= 5);
|
||||
|
||||
if s.len() > max_chars {
|
||||
format!("{}…", truncate(&s, max_chars.saturating_sub(3)))
|
||||
format!("{}…", truncate(s, max_chars.saturating_sub(3)))
|
||||
} else {
|
||||
s.to_string()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user