Appease clippy
This commit is contained in:
parent
eeb21af841
commit
233b28a1b9
19 changed files with 49 additions and 52 deletions
|
@ -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()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue