@@ -141,7 +141,7 @@ impl DevicePathNode {
141
141
}
142
142
143
143
/// Cast to a [`FfiDevicePath`] pointer.
144
- pub fn as_ffi_ptr ( & self ) -> * const FfiDevicePath {
144
+ pub const fn as_ffi_ptr ( & self ) -> * const FfiDevicePath {
145
145
let ptr: * const Self = self ;
146
146
ptr. cast :: < FfiDevicePath > ( )
147
147
}
@@ -199,7 +199,7 @@ impl DevicePathInstance {
199
199
/// reached.
200
200
///
201
201
/// [`DevicePathNodes`]: DevicePathNode
202
- pub fn node_iter ( & self ) -> DevicePathNodeIterator {
202
+ pub const fn node_iter ( & self ) -> DevicePathNodeIterator {
203
203
DevicePathNodeIterator {
204
204
nodes : & self . data ,
205
205
stop_condition : StopCondition :: AnyEndNode ,
@@ -271,7 +271,7 @@ impl DevicePath {
271
271
}
272
272
273
273
/// Get an iterator over the [`DevicePathInstance`]s in this path.
274
- pub fn instance_iter ( & self ) -> DevicePathInstanceIterator {
274
+ pub const fn instance_iter ( & self ) -> DevicePathInstanceIterator {
275
275
DevicePathInstanceIterator {
276
276
remaining_path : Some ( self ) ,
277
277
}
@@ -281,7 +281,7 @@ impl DevicePath {
281
281
/// `self`. Iteration ends when a path is reached where
282
282
/// [`is_end_entire`][DevicePathNode::is_end_entire] is true. That ending
283
283
/// path is not returned by the iterator.
284
- pub fn node_iter ( & self ) -> DevicePathNodeIterator {
284
+ pub const fn node_iter ( & self ) -> DevicePathNodeIterator {
285
285
DevicePathNodeIterator {
286
286
nodes : & self . data ,
287
287
stop_condition : StopCondition :: EndEntireNode ,
0 commit comments