Skip to content

Commit a6326f6

Browse files
committed
Reformat.
1 parent 2e40a87 commit a6326f6

File tree

6 files changed

+11
-18
lines changed

6 files changed

+11
-18
lines changed

examples/http-client/src/client.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,8 @@ use crate::{
44
};
55

66
use phper::{classes::DynamicClass, functions::Argument, objects::Object};
7-
use reqwest::{
8-
blocking::{Client, ClientBuilder},
9-
};
10-
use std::{time::Duration};
7+
use reqwest::blocking::{Client, ClientBuilder};
8+
use std::time::Duration;
119

1210
const HTTP_CLIENT_CLASS_NAME: &'static str = "HttpClient\\HttpClient";
1311

examples/http-client/src/errors.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use phper::{
22
classes::{ClassEntry, DynamicClass, StatelessClassEntry},
3-
errors::{Throwable},
3+
errors::Throwable,
44
};
55

66
const EXCEPTION_CLASS_NAME: &'static str = "HttpClient\\HttpClientException";

examples/http-client/src/response.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
use bytes::Bytes;
22
use indexmap::map::IndexMap;
3-
use phper::{classes::DynamicClass};
3+
use phper::classes::DynamicClass;
44
use reqwest::{header::HeaderMap, StatusCode};
5-
use std::{
6-
convert::Infallible,
7-
net::SocketAddr,
8-
};
5+
use std::{convert::Infallible, net::SocketAddr};
96

107
pub const RESPONSE_CLASS_NAME: &'static str = "HttpClient\\Response";
118

phper/src/classes.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ use crate::{
2424
values::{SetVal, Val},
2525
};
2626
use dashmap::DashMap;
27-
use std::{any::TypeId};
27+
use std::any::TypeId;
2828

2929
pub trait Classifiable {
3030
fn state_constructor(&self) -> Box<StateConstructor<Box<dyn Any>>>;

phper/src/errors.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ use crate::{
66
Error::Other,
77
};
88
use anyhow::anyhow;
9-
use std::{
10-
convert::Infallible, error, ffi::FromBytesWithNulError, io, str::Utf8Error,
11-
};
9+
use std::{convert::Infallible, error, ffi::FromBytesWithNulError, io, str::Utf8Error};
1210

1311
/// PHP Throwable, can cause throwing an exception when setting to [crate::values::Val].
1412
pub trait Throwable: error::Error {

phper/src/values.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -294,8 +294,8 @@ impl SetVal for &str {
294294

295295
impl SetVal for String {
296296
fn set_val(self, val: &mut Val) {
297-
let s: &str = &self;
298-
SetVal::set_val(s, val)
297+
let s: &str = &self;
298+
SetVal::set_val(s, val)
299299
}
300300
}
301301

@@ -310,8 +310,8 @@ impl SetVal for &[u8] {
310310

311311
impl SetVal for Vec<u8> {
312312
fn set_val(self, val: &mut Val) {
313-
let v: &[u8] = &self;
314-
SetVal::set_val(v, val)
313+
let v: &[u8] = &self;
314+
SetVal::set_val(v, val)
315315
}
316316
}
317317

0 commit comments

Comments
 (0)