Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
matsadler committed Aug 29, 2023
1 parent 332eba6 commit 1cf3e52
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
20 changes: 10 additions & 10 deletions src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,16 @@ impl Ruby {
/// use magnus::{prelude::*, Error, Ruby};
///
/// fn example(ruby: &Ruby) -> Result<(), Error> {
/// let i: i64 = ruby
/// .range_new(1, 100, false)?
/// .block_call("each", (), |ruby, args, _block| {
/// let i = i64::try_convert(*args.get(0).unwrap())?;
/// if i % 3 == 0 && i % 5 == 0 {
/// Err(ruby.iter_break_value(i))
/// } else {
/// Ok(())
/// }
/// })?;
/// let i: i64 =
/// ruby.range_new(1, 100, false)?
/// .block_call("each", (), |ruby, args, _block| {
/// let i = i64::try_convert(*args.get(0).unwrap())?;
/// if i % 3 == 0 && i % 5 == 0 {
/// Err(ruby.iter_break_value(i))
/// } else {
/// Ok(())
/// }
/// })?;
///
/// assert_eq!(i, 15);
/// Ok(())
Expand Down
3 changes: 1 addition & 2 deletions src/r_string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ use std::{
mem::transmute,
os::raw::{c_char, c_long},
path::{Path, PathBuf},
ptr::{self},
slice, str,
ptr, slice, str,
};

#[cfg(ruby_gte_3_0)]
Expand Down

0 comments on commit 1cf3e52

Please sign in to comment.