Skip to content

Commit d578ce2

Browse files
authored
Update MSRV to 1.67 (#138)
1 parent 0de5297 commit d578ce2

File tree

13 files changed

+32
-33
lines changed

13 files changed

+32
-33
lines changed

Cargo.toml

Lines changed: 2 additions & 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
[workspace]
12+
resolver = "2"
1213
members = [
1314
"phper",
1415
"phper-alloc",
@@ -29,7 +30,7 @@ authors = ["PHPER Framework Team", "jmjoy <jmjoy@apache.org>"]
2930
edition = "2021"
3031
license = "MulanPSL-2.0"
3132
repository = "https://github.com/phper-framework/phper"
32-
rust-version = "1.65"
33+
rust-version = "1.67"
3334

3435
[workspace.dependencies]
3536
phper = { version = "0.12.0", path = "./phper" }

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ The framework that allows us to write PHP extensions using pure and safe Rust wh
1919

2020
### Necessary
2121

22-
- **rust** 1.65 or later
22+
- **rust** 1.67 or later
2323
- **libclang** 9.0 or later
2424
- **php** 7.0 or later
2525

phper/src/arrays.rs

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

11-
//! Apis relate to [zend_array](crate::sys::zend_array).
11+
//! Apis relate to [zend_array].
1212
1313
use crate::{alloc::ToRefOwned, strings::ZStr, sys::*, values::ZVal};
1414
use derive_more::From;
@@ -61,7 +61,7 @@ impl<'a> From<Key<'a>> for InsertKey<'a> {
6161
}
6262
}
6363

64-
/// Wrapper of [zend_array](crate::sys::zend_array).
64+
/// Wrapper of [zend_array].
6565
#[repr(transparent)]
6666
pub struct ZArr {
6767
inner: zend_array,
@@ -359,7 +359,7 @@ impl ToRefOwned for ZArr {
359359
}
360360
}
361361

362-
/// Wrapper of [zend_array](crate::sys::zend_array).
362+
/// Wrapper of [zend_array].
363363
#[repr(transparent)]
364364
pub struct ZArray {
365365
inner: *mut ZArr,

phper/src/classes.rs

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

11-
//! Apis relate to [zend_class_entry](crate::sys::zend_class_entry).
11+
//! Apis relate to [zend_class_entry].
1212
1313
use crate::{
1414
arrays::ZArr,
@@ -48,7 +48,7 @@ pub fn array_access_class<'a>() -> &'a ClassEntry {
4848
unsafe { ClassEntry::from_ptr(zend_ce_arrayaccess) }
4949
}
5050

51-
/// Wrapper of [zend_class_entry](crate::sys::zend_class_entry).
51+
/// Wrapper of [zend_class_entry].
5252
#[repr(transparent)]
5353
pub struct ClassEntry {
5454
inner: zend_class_entry,
@@ -206,7 +206,7 @@ fn find_global_class_entry_ptr(name: impl AsRef<str>) -> *mut zend_class_entry {
206206
}
207207

208208
/// The [StaticStateClass] holds
209-
/// [zend_class_entry](crate::sys::zend_class_entry) and inner state, always as
209+
/// [zend_class_entry] and inner state, always as
210210
/// the static variable, and then be bind to [ClassEntity].
211211
///
212212
/// When the class registered (module initialized), the [StaticStateClass] will
@@ -240,7 +240,7 @@ pub struct StaticStateClass<T> {
240240

241241
impl<T> StaticStateClass<T> {
242242
/// Create empty [StaticStateClass], with null
243-
/// [zend_class_entry](crate::sys::zend_class_entry).
243+
/// [zend_class_entry].
244244
pub const fn null() -> Self {
245245
Self {
246246
inner: AtomicPtr::new(null_mut()),
@@ -284,7 +284,7 @@ impl<T> StaticStateClass<T> {
284284
unsafe impl<T> Sync for StaticStateClass<T> {}
285285

286286
/// The [StaticInterface] holds
287-
/// [zend_class_entry](crate::sys::zend_class_entry), always as the static
287+
/// [zend_class_entry], always as the static
288288
/// variable, and then be bind to [InterfaceEntity].
289289
///
290290
/// When the interface registered (module initialized), the [StaticInterface]
@@ -313,7 +313,7 @@ pub struct StaticInterface {
313313

314314
impl StaticInterface {
315315
/// Create empty [StaticInterface], with null
316-
/// [zend_class_entry](crate::sys::zend_class_entry).
316+
/// [zend_class_entry].
317317
pub const fn null() -> Self {
318318
Self {
319319
inner: AtomicPtr::new(null_mut()),

phper/src/functions.rs

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

11-
//! Apis relate to [zend_function_entry](crate::sys::zend_function_entry).
11+
//! Apis relate to [zend_function_entry].
1212
//!
1313
//! TODO Add lambda.
1414
@@ -151,9 +151,7 @@ impl FunctionEntry {
151151
infos.push(last_arg_info);
152152
}
153153

154-
let flags = visibility
155-
.map(|v| v as u32)
156-
.unwrap_or(Visibility::default() as u32);
154+
let flags = visibility.unwrap_or(Visibility::default() as u32);
157155

158156
zend_function_entry {
159157
fname: name.as_ptr().cast(),

phper/src/ini.rs

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

11-
//! Apis relate to [zend_ini_entry_def](crate::sys::zend_ini_entry_def).
11+
//! Apis relate to [zend_ini_entry_def].
1212
1313
use crate::{c_str, sys::*};
1414
use std::{

phper/src/modules.rs

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

11-
//! Apis relate to [zend_module_entry](crate::sys::zend_module_entry).
11+
//! Apis relate to [zend_module_entry].
1212
1313
use crate::{
1414
c_str_ptr,

phper/src/objects.rs

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

11-
//! Apis relate to [zend_object](crate::sys::zend_object).
11+
//! Apis relate to [zend_object].
1212
1313
use crate::{
1414
alloc::EBox,
@@ -30,7 +30,7 @@ use std::{
3030
ptr::null_mut,
3131
};
3232

33-
/// Wrapper of [zend_object](crate::sys::zend_object).
33+
/// Wrapper of [zend_object].
3434
#[repr(transparent)]
3535
pub struct ZObj {
3636
inner: zend_object,
@@ -287,7 +287,7 @@ impl Debug for ZObj {
287287
}
288288
}
289289

290-
/// Wrapper of [zend_object](crate::sys::zend_object).
290+
/// Wrapper of [zend_object].
291291
pub struct ZObject {
292292
inner: *mut ZObj,
293293
}
@@ -498,9 +498,9 @@ impl<T> StateObject<T> {
498498
impl<T: 'static> StateObject<T> {
499499
/// Converts into state.
500500
///
501-
/// Because the [zend_object](crate::sys::zend_object) is refcounted type,
501+
/// Because the [zend_object] is refcounted type,
502502
/// therefore, you can only obtain state ownership when the refcount of the
503-
/// [zend_object](crate::sys::zend_object) is `1`, otherwise, it will return
503+
/// [zend_object] is `1`, otherwise, it will return
504504
/// `None`.
505505
pub fn into_state(mut self) -> Option<T> {
506506
unsafe {

phper/src/references.rs

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

11-
//! Apis relate to [zend_resource](crate::sys::zend_resource).
11+
//! Apis relate to [zend_resource].
1212
1313
use crate::{sys::*, values::ZVal};
1414
use std::fmt::{self, Debug};
1515

16-
/// Wrapper of [zend_resource](crate::sys::zend_resource).
16+
/// Wrapper of [zend_resource].
1717
#[repr(transparent)]
1818
pub struct ZRef {
1919
inner: zend_reference,

phper/src/resources.rs

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

11-
//! Apis relate to [zend_resource](crate::sys::zend_resource).
11+
//! Apis relate to [zend_resource].
1212
1313
use crate::sys::*;
1414
use std::fmt::{self, Debug};
1515

16-
/// Wrapper of [zend_resource](crate::sys::zend_resource).
16+
/// Wrapper of [zend_resource].
1717
#[repr(transparent)]
1818
pub struct ZRes {
1919
inner: zend_resource,

0 commit comments

Comments
 (0)