mirror of https://github.com/hannobraun/Fornjot
Make `Region::new` more convenient to call
This commit is contained in:
parent
8270f5abb2
commit
afa79e48f4
|
@ -28,12 +28,12 @@ impl Region {
|
||||||
/// Construct an instance of `Region`
|
/// Construct an instance of `Region`
|
||||||
pub fn new(
|
pub fn new(
|
||||||
exterior: Handle<Cycle>,
|
exterior: Handle<Cycle>,
|
||||||
interiors: Vec<Handle<Cycle>>,
|
interiors: impl IntoIterator<Item = Handle<Cycle>>,
|
||||||
color: Option<Color>,
|
color: Option<Color>,
|
||||||
) -> Self {
|
) -> Self {
|
||||||
Self {
|
Self {
|
||||||
exterior,
|
exterior,
|
||||||
interiors,
|
interiors: interiors.into_iter().collect(),
|
||||||
color,
|
color,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,8 +47,6 @@ impl Face {
|
||||||
interiors: impl IntoIterator<Item = Handle<Cycle>>,
|
interiors: impl IntoIterator<Item = Handle<Cycle>>,
|
||||||
color: Option<Color>,
|
color: Option<Color>,
|
||||||
) -> Self {
|
) -> Self {
|
||||||
let interiors = interiors.into_iter().collect();
|
|
||||||
|
|
||||||
Self {
|
Self {
|
||||||
surface,
|
surface,
|
||||||
region: Region::new(exterior, interiors, color),
|
region: Region::new(exterior, interiors, color),
|
||||||
|
|
Loading…
Reference in New Issue