Skip to content

Commit 9a274b0

Browse files
Suggestions
Co-authored-by: Jubilee <[email protected]>
1 parent add2824 commit 9a274b0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pgrx/src/datum/mod.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,12 +205,13 @@ impl<'src, T: IntoDatum> From<T> for DatumWithOid<'src> {
205205
/// Implemented automatically by `#[derive(PostgresType)]`
206206
pub trait PostgresType {}
207207

208-
/// Creates a [`Vec<pg_sys::Oid>`] containing identifiers of the provded types.
208+
/// Creates an array of [`pg_sys::Oid`] with the OID of each provided type
209209
///
210210
/// # Examples
211211
///
212212
/// ```
213213
/// use pgrx::{oids_of, datum::IntoDatum};
214+
///
214215
/// let oids = oids_of![i32, f64];
215216
/// assert_eq!(oids[0], i32::type_oid().into());
216217
/// assert_eq!(oids[1], f64::type_oid().into());
@@ -223,6 +224,7 @@ pub trait PostgresType {}
223224
#[macro_export]
224225
macro_rules! oids_of {
225226
() =>(
227+
// avoid coercions to an ambiguously-typed array or slice
226228
[$crate::pg_sys::PgOid::Invalid; 0]
227229
);
228230
($($t:path),+ $(,)?) => (

0 commit comments

Comments
 (0)