Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
indietyp committed Sep 30, 2024
1 parent 2218001 commit 718f687
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion libs/@local/harpc/service/examples/account.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ use futures::{StreamExt, pin_mut, stream};
use graph_types::account::AccountId;
use harpc_net::codec::{Decoder, Encoder};
use harpc_service::{
Service,
delegate::ServiceDelegate,
metadata::Metadata,
procedure::{Procedure, ProcedureIdentifier},
role::{Client, ClientSession, Role, Server},
service::Service,
};
use harpc_tower::{
body::{Body, BodyExt},
Expand Down
2 changes: 1 addition & 1 deletion libs/@local/harpc/service/src/delegate.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use harpc_tower::{body::Body, request::Request, response::Response};
use harpc_wire_protocol::response::kind::ResponseKind;

use crate::service::Service;
use crate::Service;

pub trait ServiceDelegate<S, C> {
type Service: Service;
Expand Down
17 changes: 16 additions & 1 deletion libs/@local/harpc/service/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,22 @@
#![feature(never_type, marker_trait_attr)]

use harpc_types::{service::ServiceId, version::Version};

use self::{metadata::Metadata, procedure::ProcedureIdentifier};

pub mod delegate;
pub mod metadata;
pub mod procedure;
pub mod role;
pub mod service;

pub trait Service {
type ProcedureId: ProcedureIdentifier;
/// Heteregenous list of procedures that are part of this service, used for type-level
/// validation.
type Procedures;

const ID: ServiceId;
const VERSION: Version;

fn metadata() -> Metadata;
}
2 changes: 1 addition & 1 deletion libs/@local/harpc/service/src/procedure.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use frunk::HCons;
use harpc_types::procedure::ProcedureId;

use crate::{metadata::Metadata, service::Service};
use crate::{Service, metadata::Metadata};

/// A marker trait for procedures that are included in a service.
///
Expand Down
15 changes: 0 additions & 15 deletions libs/@local/harpc/service/src/service.rs

This file was deleted.

0 comments on commit 718f687

Please sign in to comment.