@@ -160,7 +160,7 @@ impl FormatInfo {
160160 }
161161 }
162162
163- fn fourcc ( fmt : & [ u8 ; 4 ] ) -> u32 {
163+ fn fourcc ( fmt : [ u8 ; 4 ] ) -> u32 {
164164 u32:: from ( fmt[ 0 ] )
165165 | ( u32:: from ( fmt[ 1 ] ) ) << 8
166166 | ( u32:: from ( fmt[ 2 ] ) ) << 16
@@ -315,7 +315,7 @@ impl Camera {
315315 }
316316
317317 /// Get detailed info about the available resolutions.
318- pub fn resolutions ( & self , format : & [ u8 ; 4 ] ) -> Result < ResolutionInfo > {
318+ pub fn resolutions ( & self , format : [ u8 ; 4 ] ) -> Result < ResolutionInfo > {
319319 let fourcc = FormatInfo :: fourcc ( format) ;
320320 let mut size = v4l2:: Frmsizeenum :: new ( fourcc) ;
321321
@@ -350,7 +350,7 @@ impl Camera {
350350 }
351351
352352 /// Get detailed info about the available intervals.
353- pub fn intervals ( & self , format : & [ u8 ; 4 ] , resolution : ( u32 , u32 ) ) -> Result < IntervalInfo > {
353+ pub fn intervals ( & self , format : [ u8 ; 4 ] , resolution : ( u32 , u32 ) ) -> Result < IntervalInfo > {
354354 let fourcc = FormatInfo :: fourcc ( format) ;
355355 let mut ival = v4l2:: Frmivalenum :: new ( fourcc, resolution) ;
356356
@@ -551,7 +551,7 @@ impl Camera {
551551 pub fn start ( & mut self , config : & Config ) -> Result < ( ) > {
552552 assert_eq ! ( self . state, State :: Idle ) ;
553553
554- self . tune_format ( config. resolution , config. format , config. field ) ?;
554+ self . tune_format ( config. resolution , * config. format , config. field ) ?;
555555 self . tune_stream ( config. interval ) ?;
556556 self . alloc_buffers ( config. nbuffers ) ?;
557557
@@ -611,7 +611,7 @@ impl Camera {
611611 Ok ( ( ) )
612612 }
613613
614- fn tune_format ( & self , resolution : ( u32 , u32 ) , format : & [ u8 ; 4 ] , field : u32 ) -> Result < ( ) > {
614+ fn tune_format ( & self , resolution : ( u32 , u32 ) , format : [ u8 ; 4 ] , field : u32 ) -> Result < ( ) > {
615615 let fourcc = FormatInfo :: fourcc ( format) ;
616616 let mut fmt = v4l2:: Format :: new ( resolution, fourcc, field as u32 ) ;
617617
0 commit comments