Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Streamlines ISL model using version maker traits #191

Merged
merged 5 commits into from
Aug 14, 2023

adds suggested changes

4009336
Select commit
Loading
Failed to load commit list.
Sign in for the full log view
Merged

Streamlines ISL model using version maker traits #191

adds suggested changes
4009336
Select commit
Loading
Failed to load commit list.
This check has been archived and is scheduled for deletion. Learn more about checks retention
GitHub Actions / clippy succeeded Jul 27, 2023 in 0s

clippy

1 warning

Details

Results

Message level Amount
Internal compiler error 0
Error 0
Warning 1
Note 0
Help 0

Versions

  • rustc 1.71.0 (8ede3aae2 2023-07-12)
  • cargo 1.71.0 (cfd3bbd8f 2023-06-08)
  • clippy 0.1.71 (8ede3aa 2023-07-12)

Annotations

Check warning on line 195 in ion-schema/src/system.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)`

warning: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)`
   --> ion-schema/src/system.rs:179:25
    |
179 |               Some(id) => self.types_by_id[*id]
    |  _________________________^
180 | |                 .to_owned()
181 | |                 .and_then(|type_def| match type_def {
182 | |                     TypeDefinitionKind::Named(named_type_def) => Some(Ok(named_type_def)),
...   |
194 | |                     }
195 | |                 }),
    | |__________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map
    = note: `#[warn(clippy::bind_instead_of_map)]` on by default
help: try this
    |
181 ~                 .map(|type_def| match type_def {
182 ~                     TypeDefinitionKind::Named(named_type_def) => Ok(named_type_def),
    |