Skip to content

Commit da57a01

Browse files
committed
Run cargo fmt
1 parent f25dac0 commit da57a01

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

qmetaobject/src/future.rs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ use std::task::{Context, Poll, RawWaker, RawWakerVTable, Waker};
55

66
use crate::connections::SignalArgArrayToTuple;
77

8-
98
static QT_WAKER_VTABLE: RawWakerVTable = RawWakerVTable::new(
109
|s: *const ()| {
1110
RawWaker::new(
@@ -63,7 +62,7 @@ cpp! {{
6362
}
6463
completed = rust!(ProcessQtEvent [
6564
this: *const () as "Waker *",
66-
future: *mut dyn Future<Output=()> as "TraitObject"
65+
future: *mut dyn Future<Output = ()> as "TraitObject"
6766
] -> bool as "bool" {
6867
poll_with_qt_waker(this, Pin::new_unchecked(&mut *future))
6968
});
@@ -90,7 +89,7 @@ cpp! {{
9089
}
9190

9291
~Waker() {
93-
rust!(QtDestroyFuture [future: *mut dyn Future<Output=()> as "TraitObject"] {
92+
rust!(QtDestroyFuture [future: *mut dyn Future<Output = ()> as "TraitObject"] {
9493
std::mem::drop(Box::from_raw(future))
9594
});
9695
}
@@ -159,10 +158,7 @@ pub unsafe fn wait_on_signal<Args: SignalArgArrayToTuple>(
159158

160159
impl<Args: SignalArgArrayToTuple> Future for ConnectionFuture<Args> {
161160
type Output = <Args as SignalArgArrayToTuple>::Tuple;
162-
fn poll(
163-
mut self: Pin<&mut Self>,
164-
ctx: &mut Context,
165-
) -> Poll<Self::Output> {
161+
fn poll(mut self: Pin<&mut Self>, ctx: &mut Context) -> Poll<Self::Output> {
166162
let state = &mut self.0;
167163
*state = match std::mem::replace(state, ConnectionFutureState::Invalid) {
168164
ConnectionFutureState::Finished { result } => {

qmetaobject/src/itemmodel.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,7 @@ pub trait QAbstractItemModel: QObject {
129129
/// Refer to the Qt documentation of QAbstractListModel::layoutAboutToBeChanged
130130
///
131131
/// update_model_indexes need to be called between layout_about_to_be_changed and layout_changed
132-
fn update_model_indexes(&self, f: &mut dyn FnMut(QModelIndex) -> QModelIndex)
133-
{
132+
fn update_model_indexes(&self, f: &mut dyn FnMut(QModelIndex) -> QModelIndex) {
134133
let obj = self.get_cpp_object();
135134
cpp!(unsafe [obj as "Rust_QAbstractItemModel *", f as "TraitObject"] {
136135
if (!obj) return;

0 commit comments

Comments
 (0)