Skip to content

Commit 24e59c5

Browse files
committed
revert rename pin-init -> pinned-init
1 parent a2fb453 commit 24e59c5

59 files changed

Lines changed: 199 additions & 194 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Cargo.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[package]
2-
name = "pin-init"
2+
name = "pinned-init"
33
version = "0.0.9"
44
edition = "2021"
55

@@ -8,14 +8,14 @@ license = "MIT OR Apache-2.0"
88
description = "Library to facilitate safe pinned initialization"
99
readme = "README.md"
1010

11-
documentation = "https://docs.rs/pin-init"
11+
documentation = "https://docs.rs/pinned-init"
1212
repository = "https://github.com/Rust-for-Linux/pin-init"
1313
keywords = ["safe", "pin", "init", "no-std", "rust-patterns"]
1414
categories = ["no-std", "rust-patterns", "embedded"]
1515

1616
[dependencies]
1717
paste = "1.0"
18-
pin-init-internal = { path = "./internal", version = "=0.0.5" }
18+
pinned-init-macro = { path = "./internal", version = "=0.0.5" }
1919

2020
[features]
2121
default = ["std", "alloc"]

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ If you want to use [`PinInit`], then you will have to annotate your `struct` wit
7878
that you need to write `<-` instead of `:` for fields that you want to initialize in-place.
7979

8080
```rust
81-
use pin_init::{pin_data, pin_init, InPlaceInit};
81+
use pinned_init::{pin_data, pin_init, InPlaceInit};
8282

8383
#[pin_data]
8484
struct Foo {
@@ -125,7 +125,7 @@ impl DriverData {
125125
fn new() -> impl PinInit<Self, Error> {
126126
try_pin_init!(Self {
127127
status <- CMutex::new(0),
128-
buffer: Box::init(pin_init::init_zeroed())?,
128+
buffer: Box::init(pinned_init::init_zeroed())?,
129129
}? Error)
130130
}
131131
}
@@ -146,7 +146,7 @@ actually does the initialization in the correct way. Here are the things to look
146146
`slot` gets called.
147147

148148
```rust
149-
use pin_init::{pin_data, pinned_drop, PinInit, PinnedDrop, pin_init_from_closure};
149+
use pinned_init::{pin_data, pinned_drop, PinInit, PinnedDrop, pin_init_from_closure};
150150
use core::{
151151
ptr::addr_of_mut,
152152
marker::PhantomPinned,
@@ -223,10 +223,10 @@ the `kernel` crate. The [`sync`] module is a good starting point.
223223
[`sync`]: https://rust.docs.kernel.org/kernel/sync/index.html
224224
[pinning]: https://doc.rust-lang.org/std/pin/index.html
225225
[structurally pinned fields]: https://doc.rust-lang.org/std/pin/index.html#projections-and-structural-pinning
226-
[stack]: https://docs.rs/pin-init/latest/pin_init/macro.stack_pin_init.html
227-
[`impl PinInit<Foo>`]: https://docs.rs/pin-init/latest/pin_init/trait.PinInit.html
228-
[`impl PinInit<T, E>`]: https://docs.rs/pin-init/latest/pin_init/trait.PinInit.html
229-
[`impl Init<T, E>`]: https://docs.rs/pin-init/latest/pin_init/trait.Init.html
226+
[stack]: https://docs.rs/pinned-init/latest/pinned_init/macro.stack_pin_init.html
227+
[`impl PinInit<Foo>`]: https://docs.rs/pinned-init/latest/pinned_init/trait.PinInit.html
228+
[`impl PinInit<T, E>`]: https://docs.rs/pinned-init/latest/pinned_init/trait.PinInit.html
229+
[`impl Init<T, E>`]: https://docs.rs/pinned-init/latest/pinned_init/trait.Init.html
230230
[Rust-for-Linux]: https://rust-for-linux.com/
231231

232232
<!-- cargo-rdme end -->

examples/big_struct_in_place.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// SPDX-License-Identifier: Apache-2.0 OR MIT
22

3-
use pin_init::*;
3+
use pinned_init::*;
44

55
// Struct with size over 1GiB
66
#[derive(Debug)]

examples/linked_list.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use core::{
1212
ptr::{self, NonNull},
1313
};
1414

15-
use pin_init::*;
15+
use pinned_init::*;
1616

1717
#[allow(unused_attributes)]
1818
mod error;

examples/mutex.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ use std::{
1919
time::Duration,
2020
};
2121

22-
use pin_init::*;
22+
use pinned_init::*;
2323
#[allow(unused_attributes)]
2424
#[path = "./linked_list.rs"]
2525
pub mod linked_list;

examples/pthread_mutex.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ mod pthread_mtx {
1616
ops::{Deref, DerefMut},
1717
pin::Pin,
1818
};
19-
use pin_init::*;
19+
use pinned_init::*;
2020
use std::convert::Infallible;
2121

2222
#[pin_data(PinnedDrop)]
@@ -145,7 +145,7 @@ fn main() {
145145
#[cfg(all(any(feature = "std", feature = "alloc"), not(windows)))]
146146
{
147147
use core::pin::Pin;
148-
use pin_init::*;
148+
use pinned_init::*;
149149
use pthread_mtx::*;
150150
use std::{
151151
sync::Arc,

examples/static_init.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use core::{
1212
pin::Pin,
1313
time::Duration,
1414
};
15-
use pin_init::*;
15+
use pinned_init::*;
1616
#[cfg(feature = "std")]
1717
use std::{
1818
sync::Arc,

internal/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
[package]
2-
name = "pin-init-internal"
2+
name = "pinned-init-macro"
33
version = "0.0.5"
44
edition = "2021"
55

66
authors = ["y86-dev"]
77
license = "MIT OR Apache-2.0"
8-
description = "Proc macros for the pin-init crate."
8+
description = "Proc macros for the pinned-init crate."
99

1010
repository = "https://github.com/Rust-for-Linux/pin-init"
1111

internal/src/pin_data.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use proc_macro::{Group, Punct, Spacing, TokenStream, TokenTree};
88

99
pub(crate) fn pin_data(args: TokenStream, input: TokenStream) -> TokenStream {
1010
// This proc-macro only does some pre-parsing and then delegates the actual parsing to
11-
// `pin_init::__pin_data!`.
11+
// `pinned_init::__pin_data!`.
1212

1313
let (
1414
Generics {
@@ -74,7 +74,7 @@ pub(crate) fn pin_data(args: TokenStream, input: TokenStream) -> TokenStream {
7474
.collect::<Vec<_>>();
7575
// This should be the body of the struct `{...}`.
7676
let last = rest.pop();
77-
let mut quoted = quote!(::pin_init::__pin_data! {
77+
let mut quoted = quote!(::pinned_init::__pin_data! {
7878
parse_input:
7979
@args(#args),
8080
@sig(#(#rest)*),

0 commit comments

Comments
 (0)