From 369da4eb52fcd520bdaa46b4c59cc5c6aac57e38 Mon Sep 17 00:00:00 2001 From: Eric Walker Date: Mon, 22 Jul 2024 21:08:36 -0600 Subject: [PATCH] Reviewer comments --- README.md | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 85f75e04..3be0e8ac 100644 --- a/README.md +++ b/README.md @@ -319,7 +319,7 @@ See `magnus::TryConvert` for more details. | `i8`,`i16`,`i32`,`i64`,`isize`, `magnus::Integer` | `Integer`, `#to_int` | | `u8`,`u16`,`u32`,`u64`,`usize` | `Integer`, `#to_int` | | `f32`,`f64`, `magnus::Float` | `Float`, `Numeric` | -| `String`, `PathBuf`, `char`, `magnus::RString`, `bytes::Bytes`[^3] | `String`, `#to_str` | +| `String`, `PathBuf`, `char`, `magnus::RString`, `bytes::Bytes`‡ | `String`, `#to_str` | | `magnus::Symbol` | `Symbol`, `#to_sym` | | `bool` | any object | | `magnus::Range` | `Range` | @@ -329,16 +329,19 @@ See `magnus::TryConvert` for more details. | `[T; N]` | `[T]`, `#to_ary` | | `magnus::RArray` | `Array`, `#to_ary` | | `magnus::RHash` | `Hash`, `#to_hash` | -| `std::time::SystemTime`, `magnus::Time`, `chrono::DateTime`[^4] | `Time` | +| `std::time::SystemTime`, `magnus::Time`, `chrono::DateTime`§ | `Time` | | `magnus::Value` | any object | -| `Vec`[^1] | `[T]`, `#to_ary` | -| `HashMap`[^1] | `{K => V}`, `#to_hash` | -| `&T`, `typed_data::Obj` where `T: TypedData`[^2] | instance of `::class()` | +| `Vec`\* | `[T]`, `#to_ary` | +| `HashMap`\* | `{K => V}`, `#to_hash` | +| `&T`, `typed_data::Obj` where `T: TypedData`† | instance of `::class()` | -[^1]: when converting to `Vec` and `HashMap` the types of `T`/`K`,`V` must be native Rust types. -[^2]: see the `wrap` macro. -[^3]: when the `bytes` feature is enabled -[^4]: when the `chrono` feature is enabled; `T` can be `Utc` or `FixedOffset`. +\* when converting to `Vec` and `HashMap` the types of `T`/`K`,`V` must be native Rust types. + +† see the `wrap` macro. + +‡ when the `bytes` feature is enabled + +§ when the `chrono` feature is enabled; `T` can be `Utc` or `FixedOffset`. ### Rust returning / passing values to Ruby @@ -359,9 +362,9 @@ and `magnus::ArgList` for some additional details. | `(T, U)`, `(T, U, V)`, etc, `[T; N]`, `Vec` | `Array` | | `HashMap` | `Hash` | | `std::time::SystemTime` | `Time` | -| `T`, `typed_data::Obj` where `T: TypedData`[^2] | instance of `::class()` | +| `T`, `typed_data::Obj` where `T: TypedData`\* | instance of `::class()` | -[^2]: see the `wrap` macro. +\* see the `wrap` macro. ### Conversions via Serde