/
germanubis
/
sqlx
Обзор
Документация
Войти
/
germanubis
/
sqlx
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
sqlx-mysql/src/protocol/row.rs
15 строк
312 B
Austin Bonander
fix: clippy warnings
13 июн 2024, 23:11
13 июн 2024, 23:11
bae083c
Код
Авторство
О чём код?
use std::ops::Range; use bytes::Bytes; #[derive(Debug)] pub(crate) struct Row { pub(crate) storage: Bytes, pub(crate) values: Vec<Option<Range<usize>>>, } impl Row { pub(crate) fn get(&self, index: usize) -> Option<&[u8]> { self.values[index].clone().map(|col| &self.storage[col]) } }