Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
goto-bus-stop committed Nov 6, 2024
1 parent eec08fe commit 0b27442
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion apollo-federation/src/operation/merging.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ use super::NamedFragments;
use super::Selection;
use super::SelectionSet;
use super::SelectionValue;
use crate::bail;
use crate::ensure;
use crate::error::FederationError;
use crate::bail;

impl<'a> FieldSelectionValue<'a> {
/// Merges the given field selections into this one.
Expand Down
36 changes: 18 additions & 18 deletions apollo-federation/src/query_graph/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -369,27 +369,27 @@ impl QueryGraph {
}

pub(crate) fn node_weight(&self, node: NodeIndex) -> Result<&QueryGraphNode, FederationError> {
self.graph.node_weight(node).ok_or_else(|| {
internal_error!("Node unexpectedly missing")
})
self.graph
.node_weight(node)
.ok_or_else(|| internal_error!("Node unexpectedly missing"))
}

fn node_weight_mut(&mut self, node: NodeIndex) -> Result<&mut QueryGraphNode, FederationError> {
self.graph.node_weight_mut(node).ok_or_else(|| {
internal_error!("Node unexpectedly missing")
})
self.graph
.node_weight_mut(node)
.ok_or_else(|| internal_error!("Node unexpectedly missing"))
}

pub(crate) fn edge_weight(&self, edge: EdgeIndex) -> Result<&QueryGraphEdge, FederationError> {
self.graph.edge_weight(edge).ok_or_else(|| {
internal_error!("Edge unexpectedly missing")
})
self.graph
.edge_weight(edge)
.ok_or_else(|| internal_error!("Edge unexpectedly missing"))
}

fn edge_weight_mut(&mut self, edge: EdgeIndex) -> Result<&mut QueryGraphEdge, FederationError> {
self.graph.edge_weight_mut(edge).ok_or_else(|| {
internal_error!("Edge unexpectedly missing")
})
self.graph
.edge_weight_mut(edge)
.ok_or_else(|| internal_error!("Edge unexpectedly missing"))
}

pub(crate) fn edge_head_weight(
Expand All @@ -404,9 +404,9 @@ impl QueryGraph {
&self,
edge: EdgeIndex,
) -> Result<(NodeIndex, NodeIndex), FederationError> {
self.graph.edge_endpoints(edge).ok_or_else(|| {
internal_error!("Edge unexpectedly missing")
})
self.graph
.edge_endpoints(edge)
.ok_or_else(|| internal_error!("Edge unexpectedly missing"))
}

fn schema(&self) -> Result<&ValidFederationSchema, FederationError> {
Expand All @@ -417,9 +417,9 @@ impl QueryGraph {
&self,
source: &str,
) -> Result<&ValidFederationSchema, FederationError> {
self.sources.get(source).ok_or_else(|| {
internal_error!(r#"Schema for "{source}" unexpectedly missing"#)
})
self.sources
.get(source)
.ok_or_else(|| internal_error!(r#"Schema for "{source}" unexpectedly missing"#))
}

pub(crate) fn subgraph_schemas(&self) -> &IndexMap<Arc<str>, ValidFederationSchema> {
Expand Down
2 changes: 1 addition & 1 deletion apollo-federation/src/query_plan/conditions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ use apollo_compiler::Node;
use indexmap::map::Entry;
use serde::Serialize;

use crate::error::FederationError;
use crate::bail;
use crate::error::FederationError;
use crate::operation::DirectiveList;
use crate::operation::NamedFragments;
use crate::operation::Selection;
Expand Down

0 comments on commit 0b27442

Please sign in to comment.