File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 3
3
use crate :: bindings;
4
4
use crate :: c_types;
5
5
use crate :: error:: { Error , Result } ;
6
- use crate :: CStr ;
6
+ use crate :: str :: CStr ;
7
7
use alloc:: boxed:: Box ;
8
8
use core:: pin:: Pin ;
9
9
@@ -23,7 +23,7 @@ impl SpiDevice {
23
23
pub struct DriverRegistration {
24
24
this_module : & ' static crate :: ThisModule ,
25
25
registered : bool ,
26
- name : CStr < ' static > ,
26
+ name : & ' static CStr ,
27
27
spi_driver : bindings:: spi_driver ,
28
28
}
29
29
@@ -92,7 +92,7 @@ macro_rules! declare_spi_methods {
92
92
}
93
93
94
94
impl DriverRegistration {
95
- fn new ( this_module : & ' static crate :: ThisModule , name : CStr < ' static > ) -> Self {
95
+ fn new ( this_module : & ' static crate :: ThisModule , name : & ' static CStr ) -> Self {
96
96
DriverRegistration {
97
97
this_module,
98
98
name,
@@ -104,7 +104,7 @@ impl DriverRegistration {
104
104
// FIXME: Add documentation
105
105
pub fn new_pinned < T : SpiMethods > (
106
106
this_module : & ' static crate :: ThisModule ,
107
- name : CStr < ' static > ,
107
+ name : & ' static CStr ,
108
108
) -> Result < Pin < Box < Self > > > {
109
109
let mut registration = Pin :: from ( Box :: try_new ( Self :: new ( this_module, name) ) ?) ;
110
110
You can’t perform that action at this time.
0 commit comments