cargo: Update dependencies

This commit is contained in:
Sophie Herold 2022-11-02 21:11:43 +01:00
parent 743577757f
commit 3d6564377a
11 changed files with 574 additions and 271 deletions

View file

@ -46,15 +46,15 @@ mod imp {
impl ObjectImpl for LpFileModel {}
impl ListModelImpl for LpFileModel {
fn item_type(&self, _list_model: &Self::Type) -> glib::Type {
fn item_type(&self) -> glib::Type {
gio::File::static_type()
}
fn n_items(&self, _list_model: &Self::Type) -> u32 {
fn n_items(&self) -> u32 {
self.inner.borrow().len() as u32
}
fn item(&self, _list_model: &Self::Type, position: u32) -> Option<glib::Object> {
fn item(&self, position: u32) -> Option<glib::Object> {
self.inner
.borrow()
.get(position as usize)
@ -69,7 +69,7 @@ glib::wrapper! {
impl LpFileModel {
pub fn from_directory(directory: &gio::File) -> Self {
let model = glib::Object::new::<Self>(&[]).expect("Could not create LpFileModel");
let model = glib::Object::new::<Self>(&[]);
{
// Here we use a nested scope so that the mutable borrow only lasts as long as we need it