projects
/
nihav.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix clippy warnings for update to rustc 1.46
[nihav.git]
/
nihav-core
/
src
/
formats.rs
diff --git
a/nihav-core/src/formats.rs
b/nihav-core/src/formats.rs
index 3501cb065ae8b8f85afd104c0598bffc1c55129c..713a3e5662b3e30fb342569a2f5e047ee3f59eac 100644
(file)
--- a/
nihav-core/src/formats.rs
+++ b/
nihav-core/src/formats.rs
@@
-428,8
+428,8
@@
impl ColorModel {
impl fmt::Display for ColorModel {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
let name = match *self {
impl fmt::Display for ColorModel {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
let name = match *self {
- ColorModel::RGB(fmt) => format!("RGB({})", fmt)
.to_string()
,
- ColorModel::YUV(fmt) => format!("YUV({})", fmt)
.to_string()
,
+ ColorModel::RGB(fmt) => format!("RGB({})", fmt),
+ ColorModel::YUV(fmt) => format!("YUV({})", fmt),
ColorModel::CMYK => "CMYK".to_string(),
ColorModel::HSV => "HSV".to_string(),
ColorModel::LAB => "LAB".to_string(),
ColorModel::CMYK => "CMYK".to_string(),
ColorModel::HSV => "HSV".to_string(),
ColorModel::LAB => "LAB".to_string(),
@@
-710,7
+710,7
@@
impl NAPixelFormaton {
}
ssamp
}
}
ssamp
}
- #[allow(clippy::c
yclomatic
_complexity)]
+ #[allow(clippy::c
ognitive
_complexity)]
/// Returns a short string description of the format if possible.
pub fn to_short_string(&self) -> Option<String> {
match self.model {
/// Returns a short string description of the format if possible.
pub fn to_short_string(&self) -> Option<String> {
match self.model {
@@
-1078,6
+1078,7
@@
fn parse_yuv_format(s: &str) -> Result<NAPixelFormaton, FormatParseError> {
impl FromStr for NAPixelFormaton {
type Err = FormatParseError;
impl FromStr for NAPixelFormaton {
type Err = FormatParseError;
+ #[allow(clippy::single_match)]
fn from_str(s: &str) -> Result<Self, Self::Err> {
match s {
"pal8" => return Ok(PAL8_FORMAT),
fn from_str(s: &str) -> Result<Self, Self::Err> {
match s {
"pal8" => return Ok(PAL8_FORMAT),