launchbadge / sqlx

🧰 The Rust SQL Toolkit. An async, pure Rust SQL crate featuring compile-time checked queries without a DSL. Supports PostgreSQL, MySQL, and SQLite.
Apache License 2.0
13.48k stars 1.28k forks source link

const PACKED_WIDTH: usize = size_of::<u32>(); not found in this scope #3461

Closed sebCS222 closed 2 months ago

sebCS222 commented 2 months ago

Bug Description

After upgrading to sqlx 0.8.1 from 0.6 I run into an error in .cargo/registry/src/index.crates.io-6f17d22bba15001f/sqlx-postgres-0.8.1/src/types/cube.rs:307:33 I correct it by importing: use std::mem::size_of; in cube.rs.

Minimal Reproduction

impl Header { const PACKED_WIDTH: usize = size_of::();

Info

CommanderStorm commented 2 months ago

Please see https://github.com/launchbadge/sqlx/issues/3460#issuecomment-2308435214 => please either