Skip to content

Commit 3907cf7

Browse files
bors[bot]eldruin
andauthored
Merge #274
274: Remove try_ prefix in IoPin trait r=ryankurte a=eldruin CI somehow did not catch this. Co-authored-by: Diego Barrios Romero <[email protected]>
2 parents b99fad8 + be88a6c commit 3907cf7

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/digital.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -191,14 +191,14 @@ pub trait InputPin {
191191
/// TOutputPin : OutputPin<Error = TError> + IoPin<TInputPin, TOutputPin, Error = TError>,
192192
/// {
193193
/// // Ping
194-
/// pin.try_set_low()?;
194+
/// pin.set_low()?;
195195
/// delay_fn(Duration::from_millis(10));
196-
/// pin.try_set_high()?;
196+
/// pin.set_high()?;
197197
///
198198
/// // Read
199-
/// let pin = pin.try_into_input_pin()?;
199+
/// let pin = pin.into_input_pin()?;
200200
/// delay_fn(Duration::from_millis(10));
201-
/// pin.try_is_high()
201+
/// pin.is_high()
202202
/// }
203203
/// ```
204204
pub trait IoPin<TInput, TOutput>
@@ -212,11 +212,11 @@ where
212212
/// Tries to convert this pin to input mode.
213213
///
214214
/// If the pin is already in input mode, this method should succeed.
215-
fn try_into_input_pin(self) -> Result<TInput, Self::Error>;
215+
fn into_input_pin(self) -> Result<TInput, Self::Error>;
216216

217217
/// Tries to convert this pin to output mode with the given initial state.
218218
///
219219
/// If the pin is already in the requested state, this method should
220220
/// succeed.
221-
fn try_into_output_pin(self, state: PinState) -> Result<TOutput, Self::Error>;
221+
fn into_output_pin(self, state: PinState) -> Result<TOutput, Self::Error>;
222222
}

0 commit comments

Comments
 (0)