From 189b496ad93c5fc309fa981647c98ff94dba91d0 Mon Sep 17 00:00:00 2001 From: Valmo Date: Mon, 29 Jun 2026 07:13:21 -0300 Subject: [PATCH] fixed inet typos --- src/db.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/db.rs b/src/db.rs index 51300b5..9463c8c 100644 --- a/src/db.rs +++ b/src/db.rs @@ -134,7 +134,7 @@ impl Database { } pub async fn upsert_open_endpoint(&self, ip: std::net::Ipv4Addr, port: u16) -> Result<()> { - let ip = ip.to_string(); + let ip = std::net::IpAddr::V4(ip); let port = i32::from(port); self.client @@ -148,7 +148,7 @@ impl Database { created_at, updated_at ) - VALUES ($1::inet, $2, NOW(), NOW(), NOW(), NOW()) + VALUES ($1, $2, NOW(), NOW(), NOW(), NOW()) ON CONFLICT (ip) DO UPDATE SET port = EXCLUDED.port, scanned_at = NOW(),