@@ -34,7 +34,7 @@ use super::{Vring, GM};
34
34
///
35
35
/// To support multi-threading and asynchronous IO, we enforce `the Send + Sync + 'static`.
36
36
/// So there's no plan for support of "Rc<T>" and "RefCell<T>".
37
- pub trait VhostUserBackend < B : Bitmap + ' static > : Send + Sync + ' static {
37
+ pub trait VhostUserBackend < B : Bitmap + ' static = ( ) > : Send + Sync + ' static {
38
38
/// Get number of queues supported.
39
39
fn num_queues ( & self ) -> usize ;
40
40
@@ -113,7 +113,7 @@ pub trait VhostUserBackend<B: Bitmap + 'static>: Send + Sync + 'static {
113
113
}
114
114
115
115
/// Trait without interior mutability for vhost user backend servers to implement concrete services.
116
- pub trait VhostUserBackendMut < B : Bitmap + ' static > : Send + Sync + ' static {
116
+ pub trait VhostUserBackendMut < B : Bitmap + ' static = ( ) > : Send + Sync + ' static {
117
117
/// Get number of queues supported.
118
118
fn num_queues ( & self ) -> usize ;
119
119
@@ -486,7 +486,7 @@ pub mod tests {
486
486
assert_eq ! ( backend. queues_per_thread( ) , [ 1 , 1 ] ) ;
487
487
488
488
assert_eq ! ( backend. get_config( 0x200 , 8 ) , vec![ 0xa5 ; 8 ] ) ;
489
- backend. set_config ( 0x200 , & vec ! [ 0xa5 ; 8 ] ) . unwrap ( ) ;
489
+ backend. set_config ( 0x200 , & [ 0xa5 ; 8 ] ) . unwrap ( ) ;
490
490
491
491
backend. acked_features ( 0xffff ) ;
492
492
assert_eq ! ( backend. lock( ) . unwrap( ) . acked_features, 0xffff ) ;
@@ -509,7 +509,7 @@ pub mod tests {
509
509
assert_eq ! ( backend. queues_per_thread( ) , [ 1 , 1 ] ) ;
510
510
511
511
assert_eq ! ( backend. get_config( 0x200 , 8 ) , vec![ 0xa5 ; 8 ] ) ;
512
- backend. set_config ( 0x200 , & vec ! [ 0xa5 ; 8 ] ) . unwrap ( ) ;
512
+ backend. set_config ( 0x200 , & [ 0xa5 ; 8 ] ) . unwrap ( ) ;
513
513
514
514
backend. acked_features ( 0xffff ) ;
515
515
assert_eq ! ( backend. read( ) . unwrap( ) . acked_features, 0xffff ) ;
0 commit comments