Skip to content

Commit 73306cf

Browse files
committed
Fix clippy
1 parent 407bae7 commit 73306cf

File tree

5 files changed

+7
-8
lines changed

5 files changed

+7
-8
lines changed

phper-doc/doc/_03_integrate_with_pecl/index.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ This chapter will guide you on how to integrate the phper project with `pecl` an
1010

1111
### Adapt to `phpize`
1212

13-
1. At first, imagine you have finished the hello project follow [write your first extension](_02_quick_start::_01_write_your_first_extension), can build the
14-
php extension `.so` file successfully.
13+
1. At first, imagine you have finished the hello project follow [write your first extension](_02_quick_start::_01_write_your_first_extension), can build the php extension `.so` file successfully.
1514

1615
1. And then, create the `config.m4` file using by `phpize` (In theory,
1716
`config.w32` is also required for compatibility with Windows, but now phper

phper-test/src/cli.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,7 @@ pub type ScriptCondition<'a> = (&'a dyn AsRef<Path>, &'a dyn Fn(Output) -> bool)
4141
/// checkers are pass, than the test is pass.
4242
///
4343
/// - `exec_path` is the path of the make executable, which will be used to
44-
/// detect the path of
45-
/// extension lib.
44+
/// detect the path of extension lib.
4645
///
4746
/// - `scripts` is the slice of the tuple, format is `(path of your php test
4847
/// script, checker function or closure)`.
@@ -93,6 +92,7 @@ pub fn test_php_scripts_with_condition(
9392

9493
/// Check your extension by executing the long term php script such as http
9594
/// server, if the all your specified checkers are pass, than the test is pass.
95+
#[allow(clippy::zombie_processes)]
9696
pub fn test_long_term_php_script_with_condition(
9797
lib_path: impl AsRef<Path>, script: impl AsRef<Path>,
9898
condition: impl FnOnce(&Child) + UnwindSafe,

phper-test/src/context.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ impl Context {
9898
.and_then(|name| {
9999
let mut p = p.to_path_buf();
100100
p.push("sbin");
101-
p.push(&format!(
101+
p.push(format!(
102102
"php-fpm{}",
103103
if name.starts_with("php") {
104104
name.chars().skip(3).collect::<String>()

phper/src/arrays.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ pub enum InsertKey<'a> {
4949
ZStr(&'a ZStr),
5050
}
5151

52-
impl<'a> From<()> for InsertKey<'a> {
52+
impl From<()> for InsertKey<'_> {
5353
fn from(_: ()) -> Self {
5454
Self::NextIndex
5555
}
@@ -474,7 +474,7 @@ struct RawIter<'a> {
474474
_p: PhantomData<&'a ()>,
475475
}
476476

477-
impl<'a> RawIter<'a> {
477+
impl RawIter<'_> {
478478
fn new(arr: *mut zend_array) -> Self {
479479
let mut pos: HashPosition = 0;
480480
unsafe {

phper/src/output.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ pub fn log(level: LogLevel, message: impl Into<String>) {
3333
unsafe {
3434
php_error_docref1(
3535
null(),
36-
"\0".as_ptr().cast(),
36+
c"".as_ptr().cast(),
3737
level as i32,
3838
message.as_ptr().cast(),
3939
);

0 commit comments

Comments
 (0)