Skip to content

Commit 6b6b825

Browse files
committed
fix: revert doc test change
1 parent 4c99688 commit 6b6b825

File tree

3 files changed

+14
-12
lines changed

3 files changed

+14
-12
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ pub struct Particle {
161161
will generate structs that looks like this:
162162

163163
```rust
164+
use soa_derive::StructOfArray;
164165
pub struct PointVec {
165166
x: Vec<f32>,
166167
y: Vec<f32>,

example/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//! This crate is an example for the [`soa_derive`] crate functionalities. All
22
//! the code is generated by a single file:
33
//!
4-
//! ```ignore
4+
//! ```no_run
55
//! #[macro_use]
66
//! extern crate soa_derive;
77
//! # fn main() {

src/lib.rs

+12-11
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//! automatically generate code from a given struct `T` that allow to replace
33
//! `Vec<T>` with a struct of arrays. For example, the following code
44
//!
5-
//! ```ignore
5+
//! ```
66
//! # #[macro_use] extern crate soa_derive;
77
//! # fn main() {
88
//! #[derive(StructOfArray)]
@@ -17,7 +17,7 @@
1717
//!
1818
//! will generate a `CheeseVec` struct that looks like this:
1919
//!
20-
//! ```ignore
20+
//! ```
2121
//! pub struct CheeseVec {
2222
//! pub smell: Vec<f64>,
2323
//! pub color: Vec<(f64, f64, f64)>,
@@ -38,7 +38,7 @@
3838
//! (such as `Debug` or `PartialEq`), you can add an attribute `#[soa_derive =
3939
//! "Debug, PartialEq"]` to the struct declaration.
4040
//!
41-
//! ```ignore
41+
//! ```
4242
//! # #[macro_use] extern crate soa_derive;
4343
//! # fn main() {
4444
//! #[derive(Debug, PartialEq, StructOfArray)]
@@ -57,7 +57,7 @@
5757
//! attribute `#[soa_attr(Vec, cfg_attr(test, derive(PartialEq)))]` to the
5858
//! struct declaration.
5959
//!
60-
//! ```ignore
60+
//! ```
6161
//! # #[macro_use] extern crate soa_derive;
6262
//! # fn main() {
6363
//! #[derive(Debug, PartialEq, StructOfArray)]
@@ -108,7 +108,7 @@
108108
//!
109109
//! It is possible to iterate over the values in a `CheeseVec`
110110
//!
111-
//! ```ignore
111+
//! ```no_run
112112
//! # #[macro_use] extern crate soa_derive;
113113
//! # fn main() {
114114
//! # #[derive(Debug, PartialEq, StructOfArray)]
@@ -136,7 +136,7 @@
136136
//! fields from memory when iterating over the vector. In order to do so, one
137137
//! can manually pick the needed fields:
138138
//!
139-
//! ```ignore
139+
//! ```no_run
140140
//! # #[macro_use] extern crate soa_derive;
141141
//! # fn main() {
142142
//! # #[derive(Debug, PartialEq, StructOfArray)]
@@ -161,7 +161,7 @@
161161
//! In order to iterate over multiple fields at the same time, one can use the
162162
//! [soa_zip!](macro.soa_zip.html) macro.
163163
//!
164-
//! ```ignore
164+
//! ```no_run
165165
//! # #[macro_use] extern crate soa_derive;
166166
//! # fn main() {
167167
//! # #[derive(Debug, PartialEq, StructOfArray)]
@@ -189,7 +189,8 @@
189189
//!
190190
//! For example, the following code
191191
//!
192-
//! ```ignore
192+
//! ```
193+
//! use soa_derive::StructOfArray;
193194
//! #[derive(StructOfArray)]
194195
//! pub struct Point {
195196
//! x: f32,
@@ -205,7 +206,7 @@
205206
//!
206207
//! will generate structs that looks like this:
207208
//!
208-
//! ```ignore
209+
//! ```
209210
//! pub struct PointVec {
210211
//! x: Vec<f32>,
211212
//! y: Vec<f32>,
@@ -315,7 +316,7 @@ pub trait SoAIndexMut<T>: private_soa_indexes::Sealed {
315316
/// to the fields, which can be mutable references if the field name is prefixed
316317
/// with `mut`.
317318
///
318-
/// ```ignore
319+
/// ```
319320
/// # #[macro_use] extern crate soa_derive;
320321
/// # fn main() {
321322
/// #[derive(StructOfArray)]
@@ -346,7 +347,7 @@ pub trait SoAIndexMut<T>: private_soa_indexes::Sealed {
346347
/// iterator will yields elements until any of the fields or one external
347348
/// iterator returns None.
348349
///
349-
/// ```ignore
350+
/// ```
350351
/// # #[macro_use] extern crate soa_derive;
351352
/// # fn main() {
352353
/// # #[derive(StructOfArray)]

0 commit comments

Comments
 (0)