Skip to content

Commit

Permalink
Fix strictness in constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
stinodego committed Mar 26, 2024
1 parent 0f50559 commit e0fdaf5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion crates/polars-core/src/series/any_value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,12 @@ use crate::prelude::*;
use crate::utils::any_values_to_supertype;

impl<'a, T: AsRef<[AnyValue<'a>]>> NamedFrom<T, [AnyValue<'a>]> for Series {
/// Construct a new [`Series`] from a collection of AnyValues.
///
/// The data type is inferred from the values. Panics if no valid supertype exists.
fn new(name: &str, v: T) -> Self {
let av = v.as_ref();
Series::from_any_values(name, av, true).unwrap()
Series::from_any_values(name, av, false).unwrap()
}
}

Expand Down

0 comments on commit e0fdaf5

Please sign in to comment.