Skip to content

Commit

Permalink
src: lib: video: rename function to avoid clashing with FromStr trait…
Browse files Browse the repository at this point in the history
… (clippy)
  • Loading branch information
joaoantoniocardoso committed Nov 4, 2024
1 parent 5dc4bcd commit 12c6553
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/lib/video/local/video_source_local_linux.rs
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ impl VideoSource for VideoSourceLocal {
match v4l_format.fourcc.str() {
Ok(encode_str) => {
formats.push(Format {
encode: VideoEncodeType::from_str(encode_str),
encode: VideoEncodeType::from_fourcc_str(encode_str),
sizes,
});
}
Expand Down
2 changes: 1 addition & 1 deletion src/lib/video/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ impl VideoSourceType {

impl VideoEncodeType {
//TODO: use trait fromstr, check others places
pub fn from_str(fourcc: &str) -> VideoEncodeType {
pub fn from_fourcc_str(fourcc: &str) -> VideoEncodeType {
let fourcc = fourcc.to_uppercase();
match fourcc.as_str() {
"H264" => VideoEncodeType::H264,
Expand Down

0 comments on commit 12c6553

Please sign in to comment.