Skip to content

Commit 3aaff7e

Browse files
committed
strv: make as_slice const
1 parent 1554d01 commit 3aaff7e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

glib/src/collections/strv.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ impl IntoIter {
201201
// rustdoc-stripper-ignore-next
202202
/// Returns the remaining items as slice.
203203
#[inline]
204-
pub fn as_slice(&self) -> &[GStringPtr] {
204+
pub const fn as_slice(&self) -> &[GStringPtr] {
205205
unsafe {
206206
if self.len == 0 {
207207
&[]
@@ -692,7 +692,7 @@ impl StrV {
692692
// rustdoc-stripper-ignore-next
693693
/// Borrows this slice as a `&[GStringPtr]`.
694694
#[inline]
695-
pub fn as_slice(&self) -> &[GStringPtr] {
695+
pub const fn as_slice(&self) -> &[GStringPtr] {
696696
unsafe {
697697
if self.len == 0 {
698698
&[]

0 commit comments

Comments
 (0)