Skip to content

Commit a638d94

Browse files
committed
Require a mutable reference for the glib::List mutable iterators
1 parent 59bb7e0 commit a638d94

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

glib/src/collections/list.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -658,7 +658,7 @@ pub struct IterMut<'a, T: TransparentPtrType> {
658658

659659
impl<'a, T: TransparentPtrType> IterMut<'a, T> {
660660
#[inline]
661-
fn new(list: &'a List<T>) -> IterMut<'a, T> {
661+
fn new(list: &'a mut List<T>) -> IterMut<'a, T> {
662662
debug_assert_eq!(
663663
mem::size_of::<T>(),
664664
mem::size_of::<<T as GlibPtrDefault>::GlibType>()

glib/src/collections/slist.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,7 @@ pub struct IterMut<'a, T: TransparentPtrType> {
652652

653653
impl<'a, T: TransparentPtrType> IterMut<'a, T> {
654654
#[inline]
655-
fn new(list: &'a SList<T>) -> IterMut<'a, T> {
655+
fn new(list: &'a mut SList<T>) -> IterMut<'a, T> {
656656
debug_assert_eq!(
657657
mem::size_of::<T>(),
658658
mem::size_of::<<T as GlibPtrDefault>::GlibType>()

0 commit comments

Comments
 (0)