Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit289cf88

Browse files
author
Charles Samuels
committed
add #[track_caller] to the Row::get() functions
This small quality-of-life improvement changes these errors:thread '<unnamed>' panicked at /../.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-postgres-0.7.10/src/row.rs:151:25:error retrieving column 0: error deserializing column 0: a Postgres value was `NULL`to:thread '<unnamed>' panicked at my-program.rs:100:25:error retrieving column 0: error deserializing column 0: a Postgres value was `NULL`
1 parent8989fc9 commit289cf88

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

‎tokio-postgres/src/row.rs‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ impl Row {
141141
/// # Panics
142142
///
143143
/// Panics if the index is out of bounds or if the value cannot be converted to the specified type.
144+
#[track_caller]
144145
pubfnget<'a,I,T>(&'aself,idx:I) ->T
145146
where
146147
I:RowIndex + fmt::Display,
@@ -239,6 +240,7 @@ impl SimpleQueryRow {
239240
/// # Panics
240241
///
241242
/// Panics if the index is out of bounds or if the value cannot be converted to the specified type.
243+
#[track_caller]
242244
pubfnget<I>(&self,idx:I) ->Option<&str>
243245
where
244246
I:RowIndex + fmt::Display,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp