We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Accepting an Option<T> as a function parameter is bad form because it means callers must specify a type (any type) when passing None.
Option<T>
tough/tough/src/cache.rs
Line 23 in ac9a347
The function should be changed from
pub fn cache<P1, P2, S>( &self, metadata_outdir: P1, targets_outdir: P2, targets_subset: Option<&[S]>, cache_root_chain: bool, ) -> Result<()> {}
To either this:
pub fn cache<P1, P2, S>( &self, metadata_outdir: P1, targets_outdir: P2, targets_subset: &[S], cache_root_chain: bool, ) -> Result<()> {}
Where is_empty means the same thing as is_none.
is_empty
is_none
... or this
pub fn cache<P1, P2, S>( &self, metadata_outdir: P1, targets_outdir: P2, targets_subset: Option<&[&str]>, cache_root_chain: bool, ) -> Result<()> {}
If is_empty and None need to carry different meanings.
None
The text was updated successfully, but these errors were encountered:
clone
No branches or pull requests
Accepting an
Option<T>
as a function parameter is bad form because it means callers must specify a type (any type) when passing None.tough/tough/src/cache.rs
Line 23 in ac9a347
The function should be changed from
To either this:
Where
is_empty
means the same thing asis_none
.... or this
If
is_empty
andNone
need to carry different meanings.The text was updated successfully, but these errors were encountered: