From 6b75a5824bf7232e2b3e43e771c50db491f2c520 Mon Sep 17 00:00:00 2001 From: Drake Tetreault Date: Mon, 5 Apr 2021 23:40:42 -0700 Subject: [PATCH] message module to request module. --- examples/basic_sign.rs | 4 ++-- src/lib.rs | 2 +- src/{message.rs => request.rs} | 0 src/signature.rs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) rename src/{message.rs => request.rs} (100%) diff --git a/examples/basic_sign.rs b/examples/basic_sign.rs index 7dd7c99..a414a5c 100644 --- a/examples/basic_sign.rs +++ b/examples/basic_sign.rs @@ -4,7 +4,7 @@ use std::collections::HashMap; use bytes::BytesMut; use http_sign::*; -use http_sign::message::{BorrowedHttpRequest, Method}; +use http_sign::request::{BorrowedHttpRequest, Method}; use ring::{rand::SystemRandom, signature::RsaKeyPair}; static KEY: &'static [u8] = include_bytes!("example-rsa-2048-key.pk8"); @@ -12,7 +12,7 @@ static KEY: &'static [u8] = include_bytes!("example-rsa-2048-key.pk8"); fn main() { let mut headers = HashMap::new(); headers.insert("x-foo".to_string(), "bar".to_string()); - let mut request = http_sign::message::OwnedHttpRequest::new( + let mut request = http_sign::request::OwnedHttpRequest::new( Method::Get, "/foo/bar".to_string(), Some("foo=bar".to_string()), diff --git a/src/lib.rs b/src/lib.rs index 0b53a31..8cfb633 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -3,7 +3,7 @@ #![feature(min_type_alias_impl_trait)] mod algorithm; -pub mod message; +pub mod request; mod signature; #[allow(deprecated)] diff --git a/src/message.rs b/src/request.rs similarity index 100% rename from src/message.rs rename to src/request.rs diff --git a/src/signature.rs b/src/signature.rs index 3261ccd..10102a7 100644 --- a/src/signature.rs +++ b/src/signature.rs @@ -3,7 +3,7 @@ use std::time::SystemTime; use bytes::{BufMut, BytesMut}; -use crate::{algorithm::SignatureAlgorithm, message::{Headers, HttpRequest}}; +use crate::{algorithm::SignatureAlgorithm, request::{Headers, HttpRequest}}; /// An element that contributes to the signature calculation. Standard HTTP headers may /// be included in the signature, as well as special non-header fields such as