Skip to content

Commit

Permalink
Make all comment delimeters uniform (#2120)
Browse files Browse the repository at this point in the history
Purely superficial.
  • Loading branch information
olix0r authored Jan 5, 2023
1 parent b1be983 commit 3d84a72
Show file tree
Hide file tree
Showing 12 changed files with 29 additions and 29 deletions.
8 changes: 4 additions & 4 deletions hyper-balance/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ pub struct PendingUntilEosBody<T, B> {
body: B,
}

// ==== PendingUntilFirstData ====
// === PendingUntilFirstData ===

impl<T, B> TrackCompletion<T, http::Response<B>> for PendingUntilFirstData
where
Expand All @@ -55,7 +55,7 @@ where
}
}

// ==== PendingUntilEos ====
// === PendingUntilEos ===

impl<T, B> TrackCompletion<T, http::Response<B>> for PendingUntilEos
where
Expand All @@ -76,7 +76,7 @@ where
}
}

// ==== PendingUntilFirstDataBody ====
// === PendingUntilFirstDataBody ===

impl<T, B> Default for PendingUntilFirstDataBody<T, B>
where
Expand Down Expand Up @@ -134,7 +134,7 @@ where
}
}

// ==== PendingUntilEosBody ====
// === PendingUntilEosBody ===

impl<T, B> Default for PendingUntilEosBody<T, B>
where
Expand Down
2 changes: 1 addition & 1 deletion linkerd/app/integration/src/test_env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ pub struct TestEnv {
values: HashMap<&'static str, String>,
}

// ===== impl TestEnv =====
// === impl TestEnv ===

impl TestEnv {
pub fn put(&mut self, key: &'static str, value: String) {
Expand Down
4 changes: 2 additions & 2 deletions linkerd/app/src/env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -922,7 +922,7 @@ fn convert_attributes_string_to_map(attributes: String) -> HashMap<String, Strin
.collect()
}

// ===== impl Env =====
// === impl Env ===

impl Strings for Env {
fn get(&self, key: &str) -> Result<Option<String>, EnvError> {
Expand All @@ -945,7 +945,7 @@ impl Env {
}
}

// ===== Parsing =====
// === Parsing ===

/// There is a dependency on identity being enabled for tap to work. The
/// status of tap is determined by the ENV_TAP_SVC_NAME env variable being set
Expand Down
2 changes: 1 addition & 1 deletion linkerd/meshtls/tests/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ impl Param<Keepalive> for Server {
}
}

/// === impl ServerParams ===
// === impl ServerParams ===

impl<T> ExtractParam<tls::server::Timeout, T> for ServerParams {
fn extract_param(&self, _: &T) -> tls::server::Timeout {
Expand Down
2 changes: 1 addition & 1 deletion linkerd/metrics/src/counter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use std::sync::atomic::{AtomicU64, Ordering};
#[derive(Debug)]
pub struct Counter<F = ()>(AtomicU64, std::marker::PhantomData<F>);

// ===== impl Counter =====
// === impl Counter ===

impl<F> Default for Counter<F> {
fn default() -> Self {
Expand Down
6 changes: 3 additions & 3 deletions linkerd/metrics/src/histogram.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ pub struct Bounds(pub &'static [Bucket]);
/// Helper that lazily formats an `{K}="{V}"`" label.
struct Label<K: fmt::Display, V: fmt::Display>(K, V);

// ===== impl Histogram =====
// === impl Histogram ===

impl<V: Into<u64>, F: Factor> Histogram<V, F> {
pub fn new(bounds: &'static Bounds) -> Self {
Expand Down Expand Up @@ -220,15 +220,15 @@ impl<V: Into<u64>, F: Factor> FmtMetric for Histogram<V, F> {
}
}

// ===== impl Label =====
// === impl Label ===

impl<K: fmt::Display, V: fmt::Display> FmtLabels for Label<K, V> {
fn fmt_labels(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "{}=\"{}\"", self.0, self.1)
}
}

// ===== impl Bucket =====
// === impl Bucket ===

impl fmt::Display for Bucket {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
Expand Down
6 changes: 3 additions & 3 deletions linkerd/metrics/src/prom.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ pub struct Metric<'a, N: fmt::Display, M: FmtMetric> {
pub _p: PhantomData<M>,
}

// ===== impl Metric =====
// === impl Metric ===

impl<'a, N: fmt::Display, M: FmtMetric> Metric<'a, N, M> {
pub fn new(name: N, help: &'a str) -> Self {
Expand Down Expand Up @@ -146,7 +146,7 @@ impl<N: Clone + fmt::Display, M: FmtMetric> Clone for Metric<'_, N, M> {

impl<N: Copy + fmt::Display, M: FmtMetric> Copy for Metric<'_, N, M> {}

// ===== impl FmtLabels =====
// === impl FmtLabels ===

impl<'a, A: FmtLabels + 'a> FmtLabels for &'a A {
fn fmt_labels(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
Expand Down Expand Up @@ -188,7 +188,7 @@ impl<A: FmtLabels, B: FmtLabels> FmtLabels for (Option<A>, B) {
}
}

// ===== impl FmtMetrics =====
// === impl FmtMetrics ===

impl<'a, A: FmtMetrics + 'a> FmtMetrics for &'a A {
#[inline]
Expand Down
2 changes: 1 addition & 1 deletion linkerd/metrics/src/serve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ pub struct Serve<M> {
metrics: M,
}

// ===== impl Serve =====
// === impl Serve ===

impl<M> Serve<M> {
pub fn new(metrics: M) -> Self {
Expand Down
6 changes: 3 additions & 3 deletions linkerd/proxy/http/src/glue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ pub struct HyperConnectFuture<F> {
inner: F,
absolute_form: bool,
}
// ===== impl UpgradeBody =====
// === impl UpgradeBody ===

impl HttpBody for UpgradeBody {
type Data = Bytes;
Expand Down Expand Up @@ -132,7 +132,7 @@ impl PinnedDrop for UpgradeBody {
}
}

// ===== impl HyperServerSvc =====
// === impl HyperServerSvc ===

impl<S> HyperServerSvc<S> {
pub fn new(service: S) -> Self {
Expand All @@ -157,7 +157,7 @@ where
}
}

// ===== impl HyperConnect =====
// === impl HyperConnect ===

impl<C, T> HyperConnect<C, T> {
pub(super) fn new(connect: C, target: T, absolute_form: bool) -> Self {
Expand Down
4 changes: 2 additions & 2 deletions linkerd/proxy/http/src/upgrade.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ pub struct Service<S> {
upgrade_drain_signal: drain::Watch,
}

// ===== impl Http11Upgrade =====
// === impl Http11Upgrade ===

impl Http11Upgrade {
/// Returns a pair of upgrade handles.
Expand Down Expand Up @@ -160,7 +160,7 @@ impl Drop for Inner {
}
}

// ===== impl Service =====
// === impl Service ===
impl<S> Service<S> {
pub fn new(service: S, upgrade_drain_signal: drain::Watch) -> Self {
Self {
Expand Down
10 changes: 5 additions & 5 deletions linkerd/proxy/tap/src/grpc/match_.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ pub enum HttpMatch {
Authority(observe_request::r#match::http::string_match::Match),
}

// ===== impl Match ======
// === impl Match ===

impl Match {
fn from_seq(seq: observe_request::r#match::Seq) -> Result<Vec<Self>, InvalidMatch> {
Expand Down Expand Up @@ -130,7 +130,7 @@ impl TryFrom<observe_request::r#match::Match> for Match {
}
}

// ===== impl LabelMatch ======
// === impl LabelMatch ===

impl LabelMatch {
fn matches(&self, labels: &BTreeMap<String, String>) -> bool {
Expand All @@ -153,7 +153,7 @@ impl TryFrom<observe_request::r#match::Label> for LabelMatch {
}
}

// ===== impl TcpMatch ======
// === impl TcpMatch ===

impl TcpMatch {
fn matches(&self, addr: net::SocketAddr) -> bool {
Expand Down Expand Up @@ -196,7 +196,7 @@ impl TryFrom<observe_request::r#match::Tcp> for TcpMatch {
}
}

// ===== impl NetMatch ======
// === impl NetMatch ===

impl NetMatch {
fn matches(&self, addr: &net::IpAddr) -> bool {
Expand Down Expand Up @@ -242,7 +242,7 @@ impl TryFrom<observe_request::r#match::tcp::Netmask> for NetMatch {
}
}

// ===== impl HttpMatch ======
// === impl HttpMatch ===

impl HttpMatch {
fn matches<B, I: Inspect>(&self, req: &http::Request<B>, inspect: &I) -> bool {
Expand Down
6 changes: 3 additions & 3 deletions linkerd/stack/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ pub trait InsertParam<P, T> {
#[derive(Copy, Clone, Debug)]
pub struct CloneParam<P>(P);

/// === Param ===
// === Param ===

/// The identity `Param`.
impl<T: ToOwned> Param<T::Owned> for T {
Expand All @@ -103,7 +103,7 @@ impl<T: ToOwned> Param<T::Owned> for T {
}
}

/// === ExtractParam ===
// === ExtractParam ===

impl<F, P, T> ExtractParam<P, T> for F
where
Expand Down Expand Up @@ -135,7 +135,7 @@ impl<P: ToOwned, T> ExtractParam<P::Owned, T> for CloneParam<P> {
}
}

/// === InsertParam ===
// === InsertParam ===

impl<P, T> InsertParam<P, T> for () {
type Target = (P, T);
Expand Down

0 comments on commit 3d84a72

Please sign in to comment.