Skip to content

Commit

Permalink
Clippy/format
Browse files Browse the repository at this point in the history
  • Loading branch information
vigoo committed Oct 10, 2024
1 parent c9778d6 commit a31cff5
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion golem-component-service-base/src/repo/component.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ use conditional_trait_gen::{trait_gen, when};
use golem_common::model::component_metadata::ComponentMetadata;
use golem_common::model::{ComponentId, ComponentType};
use golem_service_base::model::{ComponentName, VersionedComponentId};
use golem_service_base::repo::RepoError;
use sqlx::{Database, Pool, Row};
use std::fmt::Display;
use std::ops::Deref;
use std::result::Result;
use std::sync::Arc;
use tracing::{debug, error};
use uuid::Uuid;
use golem_service_base::repo::RepoError;

#[derive(sqlx::FromRow, Debug, Clone)]
pub struct ComponentRecord {
Expand Down
2 changes: 1 addition & 1 deletion golem-service-base/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

use std::time::Duration;
use serde::{Deserialize, Serialize};
use std::time::Duration;

#[derive(Clone, Debug, Serialize, Deserialize)]
#[serde(tag = "type", content = "config")]
Expand Down
2 changes: 1 addition & 1 deletion golem-worker-service-base/src/repo/api_definition.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
use crate::api_definition::http::{CompiledHttpApiDefinition, HttpApiDefinition};
use async_trait::async_trait;
use conditional_trait_gen::{trait_gen, when};
use golem_service_base::repo::RepoError;
use sqlx::{Database, Pool, Row};
use std::fmt::Display;
use std::ops::Deref;
use std::sync::Arc;
use golem_service_base::repo::RepoError;

#[derive(sqlx::FromRow, Debug, Clone)]
pub struct ApiDefinitionRecord {
Expand Down
10 changes: 6 additions & 4 deletions golem-worker-service-base/src/repo/api_deployment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ use crate::api_definition::ApiSite;
use crate::repo::api_definition::ApiDefinitionRecord;
use crate::service::api_definition::ApiDefinitionIdWithVersion;
use async_trait::async_trait;
use conditional_trait_gen::{trait_gen, when};
use golem_service_base::repo::RepoError;
use sqlx::{Database, Pool};
use std::fmt::Display;
use std::ops::Deref;
use std::sync::Arc;
use conditional_trait_gen::{trait_gen, when};
use golem_service_base::repo::RepoError;

#[derive(sqlx::FromRow, Debug, Clone)]
pub struct ApiDeploymentRecord {
Expand Down Expand Up @@ -225,9 +225,11 @@ impl ApiDeploymentRepo for DbApiDeploymentRepo<sqlx::Postgres> {
.map_err(|e| e.into())
}


#[when(sqlx::Postgres -> get_by_site)]
async fn get_by_site_postgres(&self, site: &str) -> Result<Vec<ApiDeploymentRecord>, RepoError> {
async fn get_by_site_postgres(
&self,
site: &str,
) -> Result<Vec<ApiDeploymentRecord>, RepoError> {
sqlx::query_as::<_, ApiDeploymentRecord>(
r#"
SELECT namespace, site, host, subdomain, definition_id, definition_version, created_at::timestamptz
Expand Down

0 comments on commit a31cff5

Please sign in to comment.