Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix inconsistencies in builder API #1119

Merged
merged 4 commits into from
Sep 20, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions crates/fj-kernel/src/builder/edge.rs
Original file line number Diff line number Diff line change
@@ -30,8 +30,8 @@ impl<'a> HalfEdgeBuilder<'a> {
let [a_curve, b_curve] =
[Scalar::ZERO, Scalar::TAU].map(|coord| Point::from([coord]));

let global_vertex =
GlobalVertex::build().from_curve_and_position(&curve, a_curve);
let global_vertex = GlobalVertex::builder()
.from_curve_and_position(&curve, a_curve);

let surface_vertices = [a_curve, b_curve].map(|point_curve| {
let point_surface =
@@ -65,7 +65,7 @@ impl<'a> HalfEdgeBuilder<'a> {
let points = points.map(Into::into);

let global_vertices = points.map(|position| {
GlobalVertex::build()
GlobalVertex::builder()
.from_surface_and_position(&self.surface, position)
});

2 changes: 1 addition & 1 deletion crates/fj-kernel/src/builder/vertex.rs
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@ impl VertexBuilder {
let &surface = self.curve.surface();

let global_form =
GlobalVertex::build().from_curve_and_position(&self.curve, point);
GlobalVertex::builder().from_curve_and_position(&self.curve, point);

let surface_form = SurfaceVertex::new(
self.curve.path().point_from_path_coords(point),
2 changes: 1 addition & 1 deletion crates/fj-kernel/src/objects/vertex.rs
Original file line number Diff line number Diff line change
@@ -135,7 +135,7 @@ pub struct GlobalVertex {

impl GlobalVertex {
/// Build a `GlobalVertex` using [`GlobalVertexBuilder`]
pub fn build() -> GlobalVertexBuilder {
pub fn builder() -> GlobalVertexBuilder {
GlobalVertexBuilder
}