id
int64
0
5k
task_category
stringclasses
1 value
messages
listlengths
3
3
1,400
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with implementing a generic function in Rust that converts a value of a generic type to a specific type `foo`. However, th...
1,528
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with creating a consignment validation system for a logistics company. The consignments consist of various items and need ...
3,947
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with implementing a function that checks the validity of a given Rust code snippet. The function should determine whether ...
4,809
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with implementing a function to encode a given token structure into a base64 string using the Rust programming language. T...
2,386
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with implementing a Rust macro that conditionally exports certain functions based on the presence of specific features. Yo...
3,883
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with implementing a function that performs data type validation for a DataFrame in a Rust codebase. The DataFrame is a dat...
3,226
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with implementing a custom iterator for a data structure representing the status of corrections. The data structure `Statu...
1,579
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with creating a Rust function that determines the appropriate cache directory path based on the target operating system. T...
2,665
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with implementing a function to parse a JSON response from a blockchain API and extract relevant information about a block...
4,445
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with implementing a memory allocation strategy for a custom heap in Rust. The heap consists of pages, and each page can ho...
4,406
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with implementing a simple event manager for a windowing system. The event manager will handle various types of window eve...
1,224
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with creating a program to manage a library's book inventory. The program should allow users to add new books, remove exis...
369
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with implementing a function to validate a configuration file for a proxy server. The configuration file is represented by...
3,454
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with creating a Rust library for event handling. The library should provide a public interface for users to import all the...
3,442
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with implementing a simple ray tracer in Rust. Your goal is to create a function that calculates the reflection direction ...
2,969
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with creating a smart contract for a decentralized finance (DeFi) application. The smart contract should handle withdrawal...
2,088
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with creating a function that interacts with a database to retrieve organization records. The provided code snippet is a p...
3,931
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with creating a Rust function that configures a TLS client using the `rustls` library. The function should take a certific...
4,651
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with creating a Rust module that handles the evaluation of mathematical expressions. The module should consist of several ...
4,404
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with implementing a simple data processing pipeline using Rust. The pipeline will involve creating and manipulating data b...
4,336
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with implementing a 2D grid data structure and a method to access the value at a specific coordinate within the grid. The ...
4,145
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with implementing a graph data structure in Rust. The graph will be represented using an adjacency list. Your task is to w...
538
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with implementing a function that calculates the sum of all prime numbers within a given range. A prime number is a natura...
1,462
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with implementing a function that decodes a byte and returns a specific enum value based on the decoded byte. The enum and...
716
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with implementing a program to process a series of input lines and store the parsed data in a specific format. The input c...
1,845
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with implementing a simple HTTP server in Rust. Your server should listen for incoming HTTP requests, parse the request, a...
4,259
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with implementing a custom queue data structure in Rust. The queue should support the following operations:\n1. `new`: Cre...
1,331
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with implementing a function to parse and process configuration data for a monitoring system. The configuration data is pr...
3,556
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with implementing a simplified version of a message passing system using channels in Rust. The goal is to create a program...
4,880
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with implementing a function that converts RGB image data into RGBA format. The input image data is represented as a one-d...
2,149
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with simulating a simple card game using Rust. The game involves a deck of cards, a computer player, and a human player. T...
3,973
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are given a snippet of code that represents a simplified version of a function in a programming language. The function takes a string...
701
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with implementing a simple error-handling mechanism for a Rust program. Your goal is to create a function that calls anoth...
2,105
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with implementing a function to perform a series of vector rotations in a 3D space. The function should take in a vector `...
4,833
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with implementing a file path manipulation utility in Rust. Your goal is to complete the implementation of a method that c...
4,025
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with implementing a simplified blockchain data structure in Rust. A blockchain is a decentralized, distributed ledger that...
525
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with creating a Discord bot command that verifies the identity of a user based on their unique ID. The bot should only exe...
665
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with implementing a function to process incoming HTTP requests in a Rust web application. The function `execute` is asynch...
321
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are given an array of integers representing the results of a series of binary experiments. Each element in the array is either 0 or 1...
662
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with implementing a Merkle Sparse Tree data structure. A Merkle Sparse Tree is a variant of a Merkle Tree that is designed...
4,763
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are given the following Rust code snippet:\n\n```rust\nstruct Bar {\n time: i32,\n ratio: f32,\n size: u16,\n}\n\nstruct Foo...
206
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with understanding and working with Rust's type aliases and associated types. In Rust, type aliases allow you to give a ne...
2,295
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with implementing a simple digital wallet system in Rust. The wallet should support depositing and withdrawing funds, as w...
3,169
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with implementing a custom dynamic linking function in Rust. The function `call_dlsym` takes in a `Dlsym` object, an ABI (...
3,063
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with creating a Rust program that manages different modules for a compiler. The program should handle the definition quali...
2,362
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with creating a custom error handling module in Rust. The `error` module should define a custom error type called `CustomE...
801
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with implementing a function that extracts information about a Rust macro expansion. The function should take ownership of...
722
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with implementing a simple schema catalog for a database management system. The schema catalog is responsible for maintain...
4,127
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with creating a simple routing system for a web application using Rust. The application uses the `frontend` library, which...
720
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with implementing a function that serves as the entry point for a program. The function should take a pointer as an argume...
2,227
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with creating a Rust module that provides functionality for working with protein structures. The module should contain a s...
2,233
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with implementing a Rust function that processes transaction errors and returns the specific error message associated with...
4,845
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with creating a custom fuzzer for a specific data structure. In this problem, you will be using the Rust programming langu...
2,990
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are given a function `num_range_filter` that takes a reference to a slice of integers and returns a new vector containing only the nu...
585
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with implementing a PrefixSet data structure in Rust. The PrefixSet is a set-like data structure that stores IP prefixes a...
4,034
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with implementing a generic function that resets the value of a given type to its default state. The function should be ab...
3,276
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with implementing a simple command-line utility in Rust for tailing a file. The `Callable` trait is provided, which repres...
1,389
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with creating a smart contract for a decentralized application (dApp) on a blockchain platform. The smart contract will ha...
4,391
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with implementing a function that applies a given function to the value inside an `Option` and returns a new `Option` cont...
1,264
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with implementing a data structure to manage a collection of nodes in a graph. The given code snippet provides a partial i...
659
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with implementing a file system compatibility checker for a storage device. The file system uses a Boot Parameter Block (B...
513
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with implementing a register allocation algorithm for a virtual machine with 32 registers. The virtual machine uses a set ...
1,590
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with implementing a synchronization mechanism for managing events in a multi-threaded environment. The goal is to create a...
1,790
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with creating a Rust function that compares the version numbers of two software packages. The version numbers are represen...
922
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with implementing a simple HTTP response handler in Rust. Your task is to complete the implementation of the `handle_respo...
288
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with creating a Rust function that processes a list of tasks in parallel using async/await and returns the results as a ve...
2,306
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with implementing a simple asynchronous message passing system in Rust. The system consists of a `Message` struct and a `C...
3,934
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with implementing a custom error handling mechanism for a web server. The server is expected to construct a response and h...
1,197
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with implementing a trait in Rust that provides an interface to access the complete trait values of a shape or a member. T...
3,608
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with implementing a function that validates a given signature represented as a byte slice. The signature is expected to be...
3,848
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with creating a program that processes a list of transactions and calculates the total amount spent by each customer. Each...
1,501
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with implementing a more performant way of performing division by 2 in Rust. The goal is to create a custom function that ...
3,859
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are given a list of integers representing the stock prices of a company over a period of time. Your task is to write a function to fi...
1,353
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with implementing a simple counter using messaging over a channel in Rust. The counter should have the ability to incremen...
2,431
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with creating a file monitoring system that watches for changes in specified files and directories. Your goal is to implem...
2,096
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with creating a Rust program that manages a library system. The program should have modules for input/output operations, s...
4,994
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with creating a Rust function that manipulates file paths and handles database connections. Your goal is to implement a fu...
4,012
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with creating a program that processes a list of file headers and extracts specific information from them. Each file heade...
4,706
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with implementing a multi-threaded program that simulates a simple lock mechanism using Rust's standard library. The lock ...
197
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with implementing a generic data structure in Rust that represents a MaybeNull type, which can be used to handle nullable ...
231
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with implementing a simplified version of Conway's Game of Life, a cellular automaton devised by the British mathematician...
4,076
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with implementing a k-nearest neighbor (k-NN) algorithm for a given set of points in a two-dimensional space. The k-NN alg...
255
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with implementing a function that converts a given enum variant into a boolean value. The enum `FLTPRSRVW` has two variant...
4,018
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are given a Rust struct representing a pattern to look for in an array. Your task is to implement a function that searches for the pa...
1,756
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with implementing a simple client-server communication system in Rust. The provided code snippet includes a partial implem...
223
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with creating a Rust program that interacts with a Kubernetes cluster using the `kube` crate. Your program needs to implem...
2,365
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with implementing a function that converts a given string of digits into their corresponding word representation. For exam...
3,011
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with implementing a function that processes input from a call context and returns an optional 16-bit unsigned integer. The...
450
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with implementing a simple color manipulation algorithm for a graphics rendering system. The system uses OpenGL for render...
3,911
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with implementing a function to calculate the hash of a Git object based on its type and content. Git objects can have dif...
2,800
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with implementing a function to resolve a `NodeAddress` to a list of `SocketAddr` instances. The `NodeAddress` enum repres...
3,435
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with creating a generic trait and implementing a method for type conversion in Rust. Your goal is to define a trait `AsAny...
272
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with implementing a logging and metrics system for a software application. The provided code snippet outlines a trait `Int...
2,279
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with implementing a simple security check for a file upload system. The system receives file data as a byte array and need...
1,407
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with implementing a generic CLI (Command Line Interface) in Rust for interacting with a data store. The provided code snip...
2,529
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with implementing a simple character statistics tracking system in Rust. You are provided with a `CharacterStats` struct t...
1,246
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with implementing a custom future type in Rust that represents a computation that may not have completed yet. Your custom ...
296
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with implementing a generic data structure in Rust that represents a fixed-size array and provides methods for manipulatin...
3,449
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with implementing a function to process a text file and extract specific information from it. The function should take a f...
1,075
oss_instruct
[ { "role": "system", "content": "You are an expert assistant who solves Rust programming problems and generates correct code." }, { "role": "user", "content": "You are tasked with creating a Rust module that implements a simple calculator. The calculator should support basic arithmetic operations...