Skip to content

Commit 467c327

Browse files
committed
refactor: remove unused ZArray imports from multiple files
1 parent 2622249 commit 467c327

File tree

4 files changed

+3
-6
lines changed

4 files changed

+3
-6
lines changed

examples/hello/src/lib.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@
88
// NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
99
// See the Mulan PSL v2 for more details.
1010

11-
use phper::{
12-
arrays::ZArray, echo, functions::Argument, modules::Module, php_get_module, values::ZVal,
13-
};
11+
use phper::{echo, functions::Argument, modules::Module, php_get_module, values::ZVal};
1412

1513
/// The php function, receive arguments with type `ZVal`.
1614
fn say_hello(arguments: &mut [ZVal]) -> phper::Result<()> {

examples/http-server/src/server.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ use axum::{
1717
};
1818
use phper::{
1919
alloc::ToRefOwned,
20-
arrays::ZArray,
2120
classes::{ClassEntity, Visibility},
2221
functions::Argument,
2322
values::ZVal,

examples/http-server/tests/integration.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
// See the Mulan PSL v2 for more details.
1010

1111
use axum::http::header::CONTENT_TYPE;
12+
use hyper::StatusCode;
1213
use phper_test::{cli::test_long_term_php_script_with_condition, utils::get_lib_path};
1314
use reqwest::blocking::Client;
1415
use std::{
@@ -17,7 +18,6 @@ use std::{
1718
thread::sleep,
1819
time::Duration,
1920
};
20-
use hyper::StatusCode;
2121

2222
#[test]
2323
fn test_php() {

phper-doc/doc/_05_internal_types/_01_z_str/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use phper::strings::ZString;
1818
let s = ZString::new("Hello world!");
1919
2020
// Will leak memory.
21-
let ptr = s.into_raw();
21+
let ptr = ZString::into_raw(s);
2222
2323
// retake pointer.
2424
let ss = unsafe { ZString::from_raw(ptr) };

0 commit comments

Comments
 (0)