Skip to content

Commit c9834fa

Browse files
fix doc test compilation without std feature
1 parent 22c8bae commit c9834fa

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

src/lib.rs

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,26 +16,18 @@
1616
//!
1717
//! ## Quick start (PCD)
1818
//!
19-
//! ```rust,no_run
20-
//! # struct T; impl iso14443::type_a::PcdTransceiver for T {
21-
//! # type Error = ();
22-
//! # fn transceive(&mut self, _: &iso14443::type_a::Frame) -> Result<Vec<u8>, ()> { todo!() }
23-
//! # fn try_enable_hw_crc(&mut self) -> Result<(), ()> { todo!() }
24-
//! # }
25-
//! # fn example(t: &mut T) -> Result<(), Box<dyn std::error::Error>> {
19+
//! ```rust,ignore
2620
//! use iso14443::type_a::{activation::activate, pcd::Pcd, Cid, Fsdi};
2721
//!
28-
//! let activation = activate(t).map_err(|e| format!("{e:?}"))?;
22+
//! let activation = activate(&mut t).map_err(|e| format!("{e:?}"))?;
2923
//! if activation.sak.iso14443_4_compliant {
3024
//! let cid = Cid::new(0).unwrap();
31-
//! let (mut pcd, _ats) = Pcd::connect(t, Fsdi::Fsd256, cid)
25+
//! let (mut pcd, _ats) = Pcd::connect(&mut t, Fsdi::Fsd256, cid)
3226
//! .map_err(|e| format!("{e:?}"))?;
3327
//! let resp = pcd.exchange(&[0x00, 0xA4, 0x04, 0x00])
3428
//! .map_err(|e| format!("{e:?}"))?;
3529
//! pcd.deselect().map_err(|e| format!("{e:?}"))?;
3630
//! }
37-
//! # Ok(())
38-
//! # }
3931
//! ```
4032
//!
4133
//! ## Features

0 commit comments

Comments
 (0)