Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| fad42e9763 | |||
| 7ac8b7c19d | |||
| fe233f9fca |
22
.github/workflows/rust.yml
vendored
Normal file
22
.github/workflows/rust.yml
vendored
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
name: Rust
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ "main" ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ "main" ]
|
||||||
|
|
||||||
|
env:
|
||||||
|
CARGO_TERM_COLOR: always
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Build
|
||||||
|
run: cargo build --verbose
|
||||||
|
- name: Run tests
|
||||||
|
run: cargo test --verbose
|
||||||
@@ -13,7 +13,7 @@ categories.workspace = true
|
|||||||
readme.workspace = true
|
readme.workspace = true
|
||||||
|
|
||||||
[workspace.package]
|
[workspace.package]
|
||||||
version = "0.2.0"
|
version = "0.2.1"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
rust-version = "1.81"
|
rust-version = "1.81"
|
||||||
|
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ fn parse_transparent_enum(mut e: syn::ItemEnum) -> (Translator, syn::Item) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) fn transform(attr: TokenStream, item: TokenStream) -> TokenStream {
|
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");
|
let expr: syn::Expr = syn::parse(attr).expect("expected expr in macro attribute");
|
||||||
|
|
||||||
|
|||||||
@@ -152,7 +152,7 @@ fn parse_struct(input: syn::ItemStruct) -> Input {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn build_output(input: Input) -> TokenStream {
|
fn build_output(input: Input) -> TokenStream {
|
||||||
let root = quote! { ::aws };
|
let root = quote! { ::aws_lib };
|
||||||
|
|
||||||
let ident = input.ident;
|
let ident = input.ident;
|
||||||
let vis = input.vis;
|
let vis = input.vis;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
//! Provides an opinionated interface to the AWS API
|
//! Provides an opinionated interface to the AWS API
|
||||||
|
|
||||||
extern crate self as aws;
|
extern crate self as aws_lib;
|
||||||
|
|
||||||
use std::{
|
use std::{
|
||||||
fmt::{self, Debug},
|
fmt::{self, Debug},
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ methods to create a struct instance for an instance [`TagList`], and turn a
|
|||||||
struct instance back into a [`TagList`]:
|
struct instance back into a [`TagList`]:
|
||||||
|
|
||||||
```rust
|
```rust
|
||||||
use aws::tags::{Tags, TagList, RawTag};
|
use aws_lib::tags::{Tags, TagList, RawTag};
|
||||||
|
|
||||||
#[Tags]
|
#[Tags]
|
||||||
struct MyTags {
|
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]`:
|
in a struct that is using `#[Tags]`:
|
||||||
|
|
||||||
```rust
|
```rust
|
||||||
use aws::tags::{Tag, Tags};
|
use aws_lib::tags::{Tag, Tags};
|
||||||
use serde::{Serialize, Deserialize};
|
use serde::{Serialize, Deserialize};
|
||||||
|
|
||||||
#[Tag(translate = serde)]
|
#[Tag(translate = serde)]
|
||||||
|
|||||||
@@ -166,7 +166,7 @@ helpers::impl_string_wrapper!(TagKey);
|
|||||||
/// * You already have a `T`: Just use [`new()`](Self::new())
|
/// * You already have a `T`: Just use [`new()`](Self::new())
|
||||||
///
|
///
|
||||||
/// ```rust
|
/// ```rust
|
||||||
/// # use aws::tags::Tag;
|
/// # use aws_lib::tags::Tag;
|
||||||
/// let tag = Tag::<bool>::new("foo".to_owned(), true);
|
/// let tag = Tag::<bool>::new("foo".to_owned(), true);
|
||||||
/// ```
|
/// ```
|
||||||
///
|
///
|
||||||
@@ -176,7 +176,7 @@ helpers::impl_string_wrapper!(TagKey);
|
|||||||
/// for `String`:
|
/// for `String`:
|
||||||
///
|
///
|
||||||
/// ```rust
|
/// ```rust
|
||||||
/// # use aws::tags::Tag;
|
/// # use aws_lib::tags::Tag;
|
||||||
/// let tag = Tag::<bool>::parse("foo".to_owned(), "true".to_owned()).unwrap();
|
/// let tag = Tag::<bool>::parse("foo".to_owned(), "true".to_owned()).unwrap();
|
||||||
/// ```
|
/// ```
|
||||||
///
|
///
|
||||||
|
|||||||
Reference in New Issue
Block a user