mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-31 07:37:24 +00:00
A few more format arg inlining
Used these commands and some manual searching ``` cargo clippy --fix --all-targets --workspace --exclude gstreamer-player --exclude i-slint-backend-linuxkms --exclude uefi-demo --exclude ffmpeg -- -A clippy::all -W clippy::uninlined_format_args cargo clippy --all-targets -- -A clippy::all -W clippy::uninlined_format_args cargo clippy --fix -- -A clippy::all -W clippy::uninlined_format_args ```
This commit is contained in:
parent
5356fdcf89
commit
4ae2627ade
26 changed files with 61 additions and 84 deletions
|
@ -84,8 +84,7 @@ impl i_slint_core::model::Model for PyModelShared {
|
|||
Ok(result) => result,
|
||||
Err(err) => {
|
||||
eprintln!(
|
||||
"Python: Model implementation of row_count() threw an exception: {}",
|
||||
err
|
||||
"Python: Model implementation of row_count() threw an exception: {err}"
|
||||
);
|
||||
return 0;
|
||||
}
|
||||
|
@ -94,7 +93,7 @@ impl i_slint_core::model::Model for PyModelShared {
|
|||
match result.extract::<usize>(py) {
|
||||
Ok(count) => count,
|
||||
Err(err) => {
|
||||
eprintln!("Python: Model implementation of row_count() returned value that cannot be cast to usize: {}", err);
|
||||
eprintln!("Python: Model implementation of row_count() returned value that cannot be cast to usize: {err}");
|
||||
0
|
||||
}
|
||||
}
|
||||
|
@ -114,8 +113,7 @@ impl i_slint_core::model::Model for PyModelShared {
|
|||
Err(err) if err.is_instance_of::<PyIndexError>(py) => return None,
|
||||
Err(err) => {
|
||||
eprintln!(
|
||||
"Python: Model implementation of row_data() threw an exception: {}",
|
||||
err
|
||||
"Python: Model implementation of row_data() threw an exception: {err}"
|
||||
);
|
||||
return None;
|
||||
}
|
||||
|
@ -124,7 +122,7 @@ impl i_slint_core::model::Model for PyModelShared {
|
|||
match result.extract::<PyValue>(py) {
|
||||
Ok(pv) => Some(pv.0),
|
||||
Err(err) => {
|
||||
eprintln!("Python: Model implementation of row_data() returned value that cannot be converted to Rust: {}", err);
|
||||
eprintln!("Python: Model implementation of row_data() returned value that cannot be converted to Rust: {err}");
|
||||
None
|
||||
}
|
||||
}
|
||||
|
@ -141,8 +139,7 @@ impl i_slint_core::model::Model for PyModelShared {
|
|||
|
||||
if let Err(err) = obj.call_method1(py, "set_row_data", (row, PyValue::from(data))) {
|
||||
eprintln!(
|
||||
"Python: Model implementation of set_row_data() threw an exception: {}",
|
||||
err
|
||||
"Python: Model implementation of set_row_data() threw an exception: {err}"
|
||||
);
|
||||
};
|
||||
});
|
||||
|
|
|
@ -50,7 +50,7 @@ impl<'a> ToPyObject for PyValueRef<'a> {
|
|||
crate::brush::PyBrush::from(brush.clone()).into_py(py)
|
||||
}
|
||||
v @ _ => {
|
||||
eprintln!("Python: conversion from slint to python needed for {:#?} and not implemented yet", v);
|
||||
eprintln!("Python: conversion from slint to python needed for {v:#?} and not implemented yet");
|
||||
().into_py(py)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue