From 7ac8b7c19dfc046a28beb8a7d981c5fded34fd0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hannes=20K=C3=B6rber?= Date: Tue, 5 Nov 2024 21:52:58 +0100 Subject: [PATCH] Fix doctests and macros after crate rename --- aws_macros/src/tag.rs | 2 +- aws_macros/src/tags.rs | 2 +- src/lib.rs | 2 +- src/tags/README.md | 4 ++-- src/tags/mod.rs | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/aws_macros/src/tag.rs b/aws_macros/src/tag.rs index 5b1e679..c74f37a 100644 --- a/aws_macros/src/tag.rs +++ b/aws_macros/src/tag.rs @@ -105,7 +105,7 @@ fn parse_transparent_enum(mut e: syn::ItemEnum) -> (Translator, syn::Item) { } pub(crate) fn transform(attr: TokenStream, item: TokenStream) -> TokenStream { - let root = quote! {::aws}; + let root = quote! {::aws_lib}; let expr: syn::Expr = syn::parse(attr).expect("expected expr in macro attribute"); diff --git a/aws_macros/src/tags.rs b/aws_macros/src/tags.rs index 582065d..9a40cc2 100644 --- a/aws_macros/src/tags.rs +++ b/aws_macros/src/tags.rs @@ -152,7 +152,7 @@ fn parse_struct(input: syn::ItemStruct) -> Input { } fn build_output(input: Input) -> TokenStream { - let root = quote! { ::aws }; + let root = quote! { ::aws_lib }; let ident = input.ident; let vis = input.vis; diff --git a/src/lib.rs b/src/lib.rs index 55e9141..320b698 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,6 +1,6 @@ //! Provides an opinionated interface to the AWS API -extern crate self as aws; +extern crate self as aws_lib; use std::{ fmt::{self, Debug}, diff --git a/src/tags/README.md b/src/tags/README.md index 04bb0d4..8af09cf 100644 --- a/src/tags/README.md +++ b/src/tags/README.md @@ -12,7 +12,7 @@ methods to create a struct instance for an instance [`TagList`], and turn a struct instance back into a [`TagList`]: ```rust -use aws::tags::{Tags, TagList, RawTag}; +use aws_lib::tags::{Tags, TagList, RawTag}; #[Tags] struct MyTags { @@ -55,7 +55,7 @@ There is a [`macro@Tag`] macro that selects the strategy, which can then be used in a struct that is using `#[Tags]`: ```rust -use aws::tags::{Tag, Tags}; +use aws_lib::tags::{Tag, Tags}; use serde::{Serialize, Deserialize}; #[Tag(translate = serde)] diff --git a/src/tags/mod.rs b/src/tags/mod.rs index f6ce63f..f871ad2 100644 --- a/src/tags/mod.rs +++ b/src/tags/mod.rs @@ -166,7 +166,7 @@ helpers::impl_string_wrapper!(TagKey); /// * You already have a `T`: Just use [`new()`](Self::new()) /// /// ```rust -/// # use aws::tags::Tag; +/// # use aws_lib::tags::Tag; /// let tag = Tag::::new("foo".to_owned(), true); /// ``` /// @@ -176,7 +176,7 @@ helpers::impl_string_wrapper!(TagKey); /// for `String`: /// /// ```rust -/// # use aws::tags::Tag; +/// # use aws_lib::tags::Tag; /// let tag = Tag::::parse("foo".to_owned(), "true".to_owned()).unwrap(); /// ``` ///