Fix clippy lints

finchie
Sep 8, 2025, 8:00 AM
YMF7D5TGK23L7YU5GEHVMPZGYYXDW5QBQAQY6QSNYK4RWQPKFRSAC

Dependencies

  • [2] 2SITVDYW Handle common errors in Fluent code
  • [3] CESJ4CTO Move macro-specific code into `macro_impl` module
  • [4] K3G4HK2J Track Fluent files using `include!`
  • [5] 7M4UI3TW Update dependencies to latest versions
  • [6] VQBJBFEX Improve error handling for missing Fluent messages
  • [7] 7X4MEZJU Use Fluent AST when reporting error spans
  • [8] NB7K77TZ Update formatting of `InteractionEnvironment::new()`
  • [9] E64LCUDQ Use `camino::Utf8PathBuf` instead of `std::path::PathBuf`
  • [10] AE3AZFVK Add `Styled<L: Localize>` struct to support localizing colors
  • [11] 7YOM2QEF Move interaction constructors from individual types to implementations on `InteractionEnvironment`
  • [12] BC22FLOQ Move interaction constructors back to individual types
  • [13] XSRT5QWX Return `InteractionError` instead of `std::io::Error` from `InteractionEnvironment::emit_message`
  • [14] XDJBTEXU Add support for integer selectors
  • [15] XPGOKS6X Add rudimentary support for built-in `LEN()` function
  • [16] Q7LUHXXB Replace localization of `Vec<Localize>` with `List` type
  • [17] LYOV6ZIR Add `layout` module for localizing with separators and vertical/horizontal padding
  • [18] RA3H7PWC Refactor `Localize` for performance
  • [19] GOMTCPOL Pass colors through a field in `Context` rather than on `Styled` directly
  • [20] DJH52CL3 Change lists to be based on type (and, or, unit) rather than length (wide, short, narrow)
  • [21] 7JPOCQEI Add explicit error handling for macro parsing
  • [22] JUV7C6ET Create initial prototype of `fluent_embed_interaction`
  • [23] NFV26FRQ Improve glob error handling
  • [24] BAH2JCJP Add progress bar to `fluent_embed_interaction`
  • [25] QFPQZR4K Refactor `fluent_embed`
  • [26] ACTDIH5I Implement `Serialize, Debug, Clone` for all container types
  • [27] FF67HCOF Improve Fluent syntax error spans
  • [28] 5TEX4MNU Split `fluent_embed` into `group` and `parse` modules
  • [*] 2HHBS7VW Add rudimentary support for localizing lists
  • [*] HHJDRLLN Create `fluent_embed_runtime` crate

Change contents

  • replacement in l10n_embed_interaction/src/lib.rs at line 28
    [13.97][13.97:133]()
    InteractionError::IO(value)
    [13.97]
    [13.133]
    Self::IO(value)
  • replacement in l10n_embed_interaction/src/lib.rs at line 51
    [18.2848][18.2848:2901](),[18.2901][8.131:246](),[8.131][8.131:246]()
    interaction_context: match interactive {
    true => InteractionContext::Terminal,
    false => InteractionContext::NonInteractive,
    [18.2848]
    [8.246]
    interaction_context: if interactive {
    InteractionContext::Terminal
    } else {
    InteractionContext::NonInteractive
  • edit in l10n_embed_interaction/src/editor.rs at line 10
    [11.4865]
    [12.292]
    #[must_use]
  • edit in l10n_embed_derive/src/macro_impl/mod.rs at line 4
    [3.97]
    [5.72]
    use camino::Utf8PathBuf;
  • replacement in l10n_embed_derive/src/macro_impl/mod.rs at line 69
    [4.84][9.0:77]()
    let tracked_paths = tracked_paths.values().map(|path| path.to_string());
    [4.84]
    [4.197]
    let tracked_paths = tracked_paths.values().map(Utf8PathBuf::to_string);
  • replacement in l10n_embed_derive/src/fluent/mod.rs at line 135
    [2.1625][9.871:957]()
    let named_source = NamedSource::new(path.to_string(), file_contents.clone());
    [2.1625]
    [7.184]
    let named_source = NamedSource::new(&path, file_contents.clone());
  • replacement in l10n_embed_derive/src/fluent/mod.rs at line 149
    [2.2225][9.958:1042]()
    source_code: NamedSource::new(path.to_string(), file_contents),
    [2.2225]
    [2.2315]
    source_code: NamedSource::new(&path, file_contents),
  • replacement in l10n_embed_derive/src/fluent/group.rs at line 85
    [6.3242][2.5240:5304](),[2.5240][2.5240:5304]()
    unexpected_key: unexpected_key.to_string(),
    [6.3242]
    [2.5304]
    unexpected_key: unexpected_key.clone(),
  • replacement in l10n_embed_derive/src/fluent/ast.rs at line 44
    [14.3605][14.3605:3751]()
    VariantType::Integer { .. } => quote!(#raw_match_target),
    VariantType::Plural { .. } => {
    [14.3605]
    [15.3940]
    VariantType::Integer => quote!(#raw_match_target),
    VariantType::Plural => {
  • replacement in l10n_embed_derive/src/fluent/ast.rs at line 208
    [14.9246][14.9246:9410]()
    match variant.default {
    // The default arm should include any enum variants not matched
    true => default_arm
    [14.9246]
    [14.9410]
    // The default arm should include any enum variants not matched
    if variant.default {
    default_arm
  • replacement in l10n_embed_derive/src/fluent/ast.rs at line 212
    [14.9479][14.9479:9614]()
    .expect("Multiple default variants"),
    false => match_arms.push((pattern, &variant.value)),
    [14.9479]
    [14.9614]
    .expect("Multiple default variants")
    } else {
    match_arms.push((pattern, &variant.value))
  • replacement in l10n_embed/src/style.rs at line 8
    [10.160][10.160:210]()
    pub fn $function_name(mut self) -> Self {
    [10.160]
    [19.181]
    #[must_use]
    pub const fn $function_name(mut self) -> Self {
  • replacement in l10n_embed/src/style.rs at line 44
    [10.749][19.443:480]()
    pub fn new(message: L) -> Self {
    [10.749]
    [10.801]
    pub const fn new(message: L) -> Self {
  • replacement in l10n_embed/src/style.rs at line 56
    [10.1105][19.515:575]()
    pub fn color(mut self, ansi_color: AnsiColor) -> Self {
    [10.1105]
    [19.575]
    #[must_use]
    pub const fn color(mut self, ansi_color: AnsiColor) -> Self {
  • edit in l10n_embed/src/list.rs at line 12
    [16.277]
    [20.0]
    #[derive(Clone, Copy, Debug)]
  • replacement in l10n_embed/src/list.rs at line 27
    [20.246][20.246:297]()
    pub fn new(messages: Vec<L>) -> Self {
    [20.246]
    [20.297]
    pub const fn new(messages: Vec<L>) -> Self {
  • replacement in l10n_embed/src/lib.rs at line 53
    [18.7744][19.676:734]()
    pub fn new(locale: Locale, use_color: bool) -> Self {
    [18.7744]
    [18.7785]
    #[must_use]
    pub const fn new(locale: Locale, use_color: bool) -> Self {
  • edit in l10n_embed/src/lib.rs at line 125
    [18.9991][18.9991:10075]()
    let preferences = RelativeTimeFormatterPreferences::from(&self.locale);
  • edit in l10n_embed/src/lib.rs at line 128
    [18.10260]
    [18.10260]
    let preferences = RelativeTimeFormatterPreferences::from(&self.locale);
  • replacement in l10n_embed/src/layout.rs at line 17
    [17.1144][17.1144:1187]()
    pub fn new(messages: Vec<L>) -> Self {
    [17.1144]
    [17.1187]
    #[must_use]
    pub const fn new(messages: Vec<L>) -> Self {
  • replacement in l10n_embed/src/layout.rs at line 36
    [18.11536][18.11536:11580]()
    buffer.push_str(&separator)
    [18.11536]
    [18.11580]
    buffer.push_str(&separator);
  • replacement in l10n_embed/src/layout.rs at line 54
    [17.2007][17.2007:2044]()
    pub fn new(message: L) -> Self {
    [17.2007]
    [17.2044]
    pub const fn new(message: L) -> Self {